简体   繁体   中英

Android InApp Billing Testing

Ok I am implementing in app subscriptions for my app. The recurring period is monthly. Everything is working OK - I can subscribe from my test accounts, am getting information from the purchase status API.

The response I get from the purchase status API is:

{ "kind": "androidpublisher#subscriptionPurchase", "initiationTimestampMsec": "1378389347847", "validUntilTimestampMsec": "1379037347847", "autoRenewing": true }

My question is how do I test if the user has cancelled the subscription or after one month has been billed again.

  1. Do I get any Intent in my app when the user cancels the subscription ?
  2. Do I get any Intent in my app when the user is billed after the recurring period ?
  3. Does the purchase token change for every recurring transaction, or it remains the same for subscription
  4. How do I test this all. Do I have to wait for a month to identify how the user is charged and the response I get on recurring billing.

Any help geeks out there would be quite useful. Thanks in advance !

  1. No. I should check subscription every time when, for example, application starts or is deployed through mHelper.queryInventory method.
  2. No. You should check as I show you above.
  3. It is no matter. You should check only that purchase is not null, its state, signature and, may be, developer payload.
  4. For above logic you don't need test this case. In your application it will have same logic as user cancels subscription.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM