Dean Wild Dean Wild - 24 days ago 8
Android Question

Testing Android IAP/In-App Purchase Subscriptions

I am implementing several Android applications to be launched on Google Play and they all have subscriptions using the Google IAP auto-renewing subscription product type.

To test the app I have done the following:


  • Uploaded a draft binary to Google Play but not published it.

  • Created and published the Subscription product in the developer console.

  • Added my Google account to the list of test accounts in the developer console

  • Exported my APK from eclipse (with the same package name and version name/code as the one uploaded to Google Play)

  • Installed this exported APK on my test device which is logged in with the test account.



I am now able to successfully test my purchase and every thing works. However, as far as I can see, this purchase is real and the subscription is actually valid for an entire month.

Is there no way to do any kind of "sandbox" testing or at least a way to prematurely cancel this subscription?

How can I test the scenario where my subscription has expired without having to wait a month?!

Any help is much appreciated!

Answer

Not for subscriptions. The new (v3) in-app billing API has been released, but it currently does not support subscriptions. When it does, it might bring an easier way to test (seems unlikely though). You just have to cancel subscriptions/purchases in the merchant console when you are done testing.