Home > OS >  loadOwnedPurchasesFromGoogle() not loading Products or history
loadOwnedPurchasesFromGoogle() not loading Products or history

Time:10-22

I am trying to use the method BillingProcessor method

bps = BillingProcessor.newBillingProcessor(this,getResources().getString(R.string.play_console_license), this);
bps.loadOwnedPurchasesFromGoogle();

But for more than 24 hour now the cache is just blank and no products etc can be found. Now this is still in dev and when I try to subscribe in the app it say that this verion of the app cannot access billing. So does that mean I cannot also read from the cache? If so, is there any easy ways to get around this so that I can test this without deploying

enter image description here

Note: It was working yesterday and was finding the products etc then I Logged out of the application and that clears the Shared preferences cache then ever since it does not work on any device. Just the results in the picture are found

CodePudding user response:

You cannot access billing services when debugging it will only work once the app has been deployed to production (From what I have experienced). Also the Billing Cache will periodically update but I am not sure how often.

If null you will get a null pointer exceptions so just put it in a try catch to ensure the app doesn't crash

  • Related