Amazon In-app purchase

前端 未结 2 1471
滥情空心
滥情空心 2021-01-03 16:47

has anybody tried implementing amazon\'s in-app purchase? I\'m having problem implementing the example on their site. below example, it\'s giving me INVALID_SKU response:

相关标签:
2条回答
  • 2021-01-03 17:21

    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 package name 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 ur app & AmazonSDKTester on KF; Hard Reset KF ; Restart Eclipse & Restart from Step 1
    0 讨论(0)
  • 2021-01-03 17:42

    INVALID_SKU occurs when SKU is not matching or not entered in JSON file. If you are implementing your test app using SDK Tester, then please make sure that the SKU which you are using in your app must have an entry in JSON file too. JSON files resides under /mnt/sdcard/ with name amazon.sdktester.json. Request you to verify whether you have created JSON file with SKU details under this path in the device.

    A good approach for managing SKUs would be:

    1. Reference SKUs as strings in your app's strings.xml file -- the same way you would use any string constant.
    2. You can test your app using SDK Tester and the amazon.sdktester.json file without doing anything on the Developer Portal.
    3. When you're ready to submit your app (after testing with SDKTester), make sure you have also submitted your IAP items on the Developer portal -- watch for typos!

    We recommend using . for a SKU format, just because it makes it obvious what it is and what app it belongs to. For example:

    com.yoyodyne.beachblanketbingo.500_coins

    0 讨论(0)
提交回复
热议问题