Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to restore purchases in Amazon API?
    primarykey
    data
    text
    <p>I have been trying from past few days to restore the purchased items in In-App Purchases in Amazon. I succeeded in purchasing items, and now I need to restore the items purchased after the app is uninstalled. I read the several links and including the following one as well:</p> <p><a href="https://developer.amazon.com/post/Tx1ZQ21OBPY53N0/Tracking-In-App-Purchases-Using-PurchaseUpdates.html" rel="nofollow noreferrer">Tracking In-App Purchases Using PurchaseUpdates</a></p> <p>This link has got some good information, and after reading the following link:</p> <p><a href="https://stackoverflow.com/questions/14078428/how-do-i-easily-restore-purchases-using-the-amazon-api">How do I easily restore purchases using the Amazon API?</a></p> <p>I know that I need to use onPurchaseUpdatesResponse() to get things done here, but the problem is that I am getting </p> <pre><code> Set&lt;Receipt&gt; receipts = response.getReceipts(); Set&lt;String&gt; revokedSkus = response.getRevokedSkus(); </code></pre> <p>both empty in onPurchaseUpdatesResponse() method. I can see the purchased items in AmazonSDKTester app, and the userId obtained by:</p> <pre><code> response.getUserId(); </code></pre> <p>is same as in AmazonSDKTester app.</p> <p>I think I might be doing something wrong in storing the offset after my purchases done successfully. But, I am not able to understand how to do things right here or what am I doing wrong, Thanks for listening and please help!</p> <p>**EDIT: ** I am setting offset as:</p> <pre><code> Offset offset = purchaseDataStorage.getPurchaseUpdatesOffset(); PurchasingManager.initiatePurchaseUpdatesRequest(offset); </code></pre> <p>and I am doing this in onGetUserIdResponse() method when the case is SUCCESSFUL.</p> <p>And I am storing the offset value in onPurchaseUpdatesResponse() when the case is SUCCESSFUL:</p> <pre><code>Offset offset = response.getOffset(); purchaseDataStorage.savePurchaseUpdatesOffset(offset); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload