question

robin avatar image
robin asked

IAP Verify Entitlement On Load Snafu

Am attempting to comply with this item on app load: "This API should be called every time your App starts . . " Purchase Update Request This API should be called every time your App starts to ensure the current user has access to all the content they are entitled to. https://developer.amazon.com/sdk/in-app-purchasing/documentation/testing-iap.html I have a hybrid app that mimics the SoftKey input SDK sample for older KF HD 7 API10 apps. Using the Amazon WebView, the MainActivity launches the Html5 page. To use IAP 1.03, the user taps on an icon from the SoftKey input panel to start a new (Java) Intent. I am able to verify that when the user accesses the IAP 'upgrade' feature on subsequent app loads, this overriden function does in fact fire and detect the previous fulfilled entitlement. In IAPActivity.java public void onPurchaseUpdatesResponseSuccess(String userId, String sku, When I place the supporting code (a minimal snippet copy of other intent) back in the MainActivity In MainActivity @Override public void onPurchaseUpdatesResponseSuccess(String userId, String sku, this function does fire in MainActivity but produces the following error occurs on app start: 08-11 15:41:09.894: W/System.err(7794): java.io.FileNotFoundException: /data/data/com.example.iap/files/purchase: open failed: ENOENT (No such file or directory) I imagine there is some security issue that is causing the intent to write to one area that is different than the MainActivity intent that is firing on app start. LogCat is peppered with the entitlement MuSKU string that is also in the .json file but as no exception occurs, the path is not easily (to me anyway) discoverable. I would like to learn how to determine (which IAP function) what the path is to the db to validate this assumption. On the assumption the above analysis is the case, what is the recommend way to detect the entitlement data that was written during another activity from the MainActivity during app start? I wasn't able to locate a file-db access function or class accessor https://developer.amazon.com/sdk/in-app-purchasing/reference/api-reference.html Robin Robin
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Sorry for late reply. It seems like though you are writing a HTML5 based hybrid app, but using our java based IAP SDK (V1) to implement in app purchase into your app. If the problem still persists, can you please provide us below information so that we can reproduce the problem. 1. Could you reproduce the issue in SampleIAPEntitlementsApp that is shipped with Amazon SDK zip? https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs/sample... 2. Which is the device you are testing on? 3. Can you please provide the code snippet through ContactUs ( https://developer.amazon.com/help/contactus.html)?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.