android in-app billing - restoreTransactionInformation

前端 未结 3 1560
死守一世寂寞
死守一世寂寞 2021-01-02 17:14

I\'m attempting to make a free app upgradable to the \"paid\" version using in-app billing. I used code from this tutorial to handle the billing as the one on the official d

3条回答
  •  礼貌的吻别
    2021-01-02 17:30

    I'm also developing a free app upgradable, but I used the oficial sample instead of Blundell's tutorial, because that tutorial does not save information and doesnt use Managed items

    Just take a look on the restoreDatabase() method in the Dungeons sample, it does what you want, checks, using the SharedPreferences if it's the first run and if it is calls the restoreTransactions method.

    To debug, just connect your device to eclipse and check the logcat, just dont forget to set the constant Debug (in Consts.java) to true and in the manifest set the debuggable tag to true also.

    To understand the sample code better I just added a lot more debug and now its working.

提交回复
热议问题