Question

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.

Was it helpful?

Solution 2

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top