How to clear the “in-app billing service” cache

前端 未结 6 395

In the documentation for in app billing (v3), it says: \"Upon a successful purchase, the user’s purchase data is cached locally by Google Play’s In-app Billing service.\"

相关标签:
6条回答
  • 2020-12-11 01:35

    If Par Nils answer not work - try to remove application and execute

    adb shell am clear-debug-app
    
    0 讨论(0)
  • 2020-12-11 01:36

    You can do this with adb (works for non-rooted as well):

    adb shell pm clear com.android.vending
    

    It's as simple as that!

    0 讨论(0)
  • 2020-12-11 01:39

    So is there a way to clear that cache?

    As far as I know, no. There is no way for a developer to clear Google Play's IAB cache.

    You can find this useful: Testing In-app Billing, from the official Android documentation.

    0 讨论(0)
  • 2020-12-11 01:40

    Couldn't you create a new emulated android install from the android development kit... then save that as a "snapshot" to before you logged in and it created all of the billing cache? Then you can just fire up a fresh instance of that VM and run your code without there already being a billing cache.

    EDIT: If you cannot do so with the emulator, I'd suggest having a phone that is rooted and rom'ed. Take a full system snapshot with Rom Manager (Nandroid Backup) and then test out your app. When you wish to reset, restore your backup via Rom Manager and you are back to before you logged into the market (and activated the billing cache). It honestly takes longer for your phone to reboot than to actually restore the data... so it's pretty fast (I do it all the time since I'm an avid root/rom-er.

    0 讨论(0)
  • 2020-12-11 01:41

    Restart your device. That works for me every time! If you have annulated the order in google wallet you must also wait for it to be cancelled there. It shoud say "Cancelled: Order will not be delivered".

    0 讨论(0)
  • 2020-12-11 01:49

    This should work, although then you may need to authenticate on Play Store again:

    enter image description here

    0 讨论(0)
提交回复
热议问题