Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Play in-app billing v3 getSkuDetails() returns cached results even if IAP's prices were changed

Google Play v3 API's IInAppBillingService.getSkuDetails() method returns cached results.

Let's look at this scenario:

  1. I have an item called com.my.item in the Google Play Console with price $1
  2. I run my game, invoked IInAppBillingService.getSkuDetails(), and indeed I get the $1 price.
  3. Now I return to the Google Play Console and change the price to $2
  4. I run my game again, invoke the method from (2) and still get $1.

Observations:

  1. The Google Play purchase activity does show the correct price ($2)
  2. Waiting for a while (2hours approx) doesn't help.
  3. Clear Data on the Google Play app resolves the issue.
  4. We tested on Galaxy Nexus (4.3), Samsung Galaxy S3 (4.1.2), with latest Google Play versions.

Anyone encountered this issue?

Thanks, Max.

like image 506
Max Raskin Avatar asked Dec 25 '22 18:12

Max Raskin


2 Answers

Its cached on the phone. Simply clear the google play cache (from the settings) of the phone

like image 180
user3044936 Avatar answered Dec 31 '22 14:12

user3044936


Currently, it's not possible to programatically invalidate the cache, so you will get old results from getSkuDetails() until Google Play's cache refreshes, which should usually happen every 24 hours if there is good network connectivity.

You reported you waited for a few hours, so that's within expectations. Could you please try waiting ~24h and see if the cache gets updated? If it gets updated, then it's working as intended. If not, then there is something else that's wrong -- maybe Google Play is having trouble updating itself on that device.

like image 31
Bruno Oliveira Avatar answered Dec 31 '22 12:12

Bruno Oliveira