in-app-purchasekindle-fireamazon-in-app-purchase

Amazon SDK Tester initiateItemDataRequest does not return products


I have a strange behaviour with the Amazon SDK Tester. I call the method

Set<String> skuSet = new HashSet<String>();
skuSet.add("removeads");
// Read data
PurchasingManager.initiateItemDataRequest(skuSet);

but it always returns FAILED in the onItemDataResponse Callback. I thought that this might have something in common with my json file who looks like this:

{
"removeads" : {
    "itemType": "ENTITLED",
    "price": 10.00,
    "title": "Level 2",
    "description": "An entitlement to play level 2"
    }
}

But if i change the SDK Tester Settings to SUCCESSFULL_WITH_UNAVAILABLE_SKUS I can see mit "removeads" product inside the unavailable Products Hashset.

Can you see any error inside my code or JSON? I'm using this on Huawei Android Phone with Amazon Store and SDK Tester installed, maybe this is a problem?

Thanks


Solution

  • finally found the very easy solution. It seems that Huawei blocks the local filesystem on the phone if the device is connected to the computer. Because of this, the SDK Tester cannot read the amazon.sdktester.json File. And this is finally the reason why I did not receive any IAP-Products.

    So if it fails on your current phone. Be sure to check if you cannot access the files in the phones fileexplorer. If not change the phone and it will work.