Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing in-app purchases in Kindle Fire application

I am not able to test in app purchases even with Amazon Appstore SDK Tester.

public void onPurchaseResponse(final PurchaseResponse purchaseResponse)

purchaseResponse always has "INVALID_SKU" even if I have amazon.sdktester.json file with fake JSON.

file content: { "test" : { "itemType": "CONSUMABLE", "price": 0.99, "title": "More Clicks!", "description": "Click your button ten more times!", "smallIconUrl": "http://www.google.com/images/srpr/logo3w.png" },

"com.amazon.buttonclicker.ten_clicks" : {
    "itemType": "CONSUMABLE",
    "price": 0.99,
    "title": "More Clicks!",
    "description": "Click your button ten more times!",
    "smallIconUrl": "http://www.google.com/images/srpr/logo3w.png"
  },

  "com.amazon.buttonclicker.blue_button" : {
    "itemType": "ENTITLED",
    "price": 0.99,
    "title": "Blue Button",
    "description": "Button Clicker - Now in Blue!",
    "smallIconUrl": "http://www.google.com/images/srpr/logo3w.png"
  }
}

Even sample application does not work. Do you have any suggestions how to test application? It seems that Amazon SDK Tester does not intercept requests.

like image 410
Ruzard Avatar asked Feb 20 '23 13:02

Ruzard


1 Answers

Here's how I got the In App purchases to work on Kindle Fire (after several hrs of struggle...)

  1. adb install AmazonSDKTester.apk (Install SDKTester on Kindle Fire)
  2. Create a file amazon.sdktester.json in the SDCARD directory (The connected KF shows up as SDCARD in Finder on ur Mac)
  3. Contents of amazon.sdktester.json - { "com.yourcompany.yourpkgname.200_coins" : { "itemType": "CONSUMABLE", "price": 0.99, "title": "200 COINS", "description": "2 COINS", "smallIconUrl": "http://www.yourcompany.com/icon.png" } }
  4. Press the power button on KF & press "Disconnect" button - Now KF is no longer a mounted drive on ur Mac.
  5. Run the AmazonSDKTester app on KF.
  6. Run your app from Eclipse. Make sure the package name in the JSON matches the In App Item SKU on Amazon's website & in the PurchasingManager.initiatePurchaseRequest("com.yourcompany.yourpkgname.200_coins");
  7. Now you should see the In App interstitials showing up.
  8. Still doesn't work - Force Close both your app & AmazonSDKTester on KF; Hard Reset KF ; Restart Eclipse & Restart from Step 1
like image 84
Roshan Avatar answered Mar 15 '23 08:03

Roshan