I have an app and its working fine now i want to implement restore transactions method in my app. I did not find this method now how can i can call or define or make other method to restore transaction in in-app version 3. I searched on net but did not find relevant sol or info.
Asked
Active
Viewed 2,739 times
1 Answers
3
You can restore your transaction using the getPurchases()
API
Bundle ownedItems = mService.getPurchases(3, mContext.getPackageName(),
itemType, continueToken);
ArrayList mySkus, myPurchases, mySignatures;
mySkus = ownedItems.getStringArrayList(RESPONSE_INAPP_ITEM_LIST);
myPurchases = ownedItems.getStringArrayList(RESPONSE_INAPP_PURCHASE_DATA_LIST);
mySignatures = ownedItems.getStringArrayList(RESPONSE_INAPP_PURCHASE_SIGNATURE_LIST);
will list the items that you own and the corresponding data that you can use to verify the purchases.
While you make this call, be sure to
- Use the Google ID that you used to make the purchase.
- Not to use the STATIC Product IDs(android.test.purchased, android.test.refunded...). You can use the test-IDs that you created under your IAB test account.
- Use the appropriate product type and the package name of your app.

siddharthsn
- 1,709
- 1
- 21
- 32
-
hey, what is mService here? – Hiren Patel Nov 01 '13 at 09:18
-
It is the instance of the IInAppBillingService(Google Play Inapp Billing Service) that is running on your android device. You would have to create a ServiceConnection between your app and this service to communicate with the Google Play Store. – siddharthsn Nov 01 '13 at 09:43
-
These links will help you understand how to establish the service connection and make the API calls. http://developer.android.com/training/in-app-billing/preparing-iab-app.html http://developer.android.com/training/in-app-billing/preparing-iab-app.html – siddharthsn Nov 01 '13 at 09:43
-
1what is continueToken? – user3225831 Aug 23 '14 at 19:15
-
String containing a continuation token to retrieve the next set of in-app products owned by the user. – siddharthsn Aug 24 '14 at 04:32
-
@Siddharth Does it work without internet connection? – Dr.jacky Mar 04 '15 at 14:37
-
what should be the continueToken value inorder to retrieve a proper result – iAviatorJose Mar 23 '15 at 05:57