5

I have followed the following steps As shown in image .steps in In AppPayment Amazon but the problem is when I run the code provided in SDK as shown in image 4 when I click the button the number of clicks should be deducted but it is not. I have place the follwing values in string.xml m I right in theses steps?

  <string name="app_name">amazoncheckout</string>
 <string name="nothing"></string>
<string name="consumable_sku">com.amazon.checkout</string>
<string name="entitlement_sku_purple">com.amazoncheckoutconsumable</string>
<string name="entitlement_sku_green">com.amazoncheckoutentitlementn</string>
<string name="entitlement_sku_blue">com.amazon.buttonclicker.blue_button</string>
<string name="parent_subscription_sku">com.amazoncheckoutsubscription</string>
<string  name="child_subscription_sku_monthly">com.amazoncheckoutsubscriptionmonthly</string>

enter image description here

The above sku is generated by me and I also want to know the the JSON file shown in image three, I have downloaded that and placed in assert folder. What is this JSON file for? Kind provide comment on my steps where I'm wrong... the click number is shown 5 but when I click it is not deducted why? Any help will be appricated....

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
Venkat
  • 3,447
  • 6
  • 42
  • 61
  • I saw you comment, but I didn't edit sku on the web-site, I only used their offline application, which need to be installed with your own to test payments. – yozhik Apr 22 '13 at 12:56
  • Hey yozhik did u tested AmazonSDKTester.apk from tools folder provided in amazon sdk ?did that worked for you? – KOTIOS Apr 23 '13 at 03:56
  • @Venkat in simple word i said just use the Amazone in-app document given by Amazone.and first test your using amazon_tester.json file and then test your in-app – Zala Janaksinh Apr 29 '13 at 07:39
  • Hello, I have the same problem that I am able to run in app demo in sandbox mode but not able to run in live. – Shrikant Salunkhe May 30 '14 at 10:13

2 Answers2

6

I'm going to try to explain how can you have the demo working, because, I think, that's your question, sorry if I'm wrong...

  1. Install the AmazonSDKTester.apk in your device and open it. It's inside tools folder in the SDK package. For install it you can use in terminal:

    adb install AmazonSDKTester.apk

  2. Next add your project to Eclipse:

    File > New > Project...>Android Project from Existing Code , browse the Button Clicker Demo Project in the SDK folder and Finish.

  3. Copy the amazon.sdktester.json file to SD memory. In the ButtonClicker project folder, go to assets folder and add the amazon.sdktester.json file to the SD memory. An easy way it's dragging the file to the SD folder using DDMS file explorer. Your SD folder may be different depends on device, in my Nexus S is like you can see in the image.

enter image description here

And that's it, you must have Button Clicker Demo sample fully working. When you make a purchase you can go to the AmazonSDKTester and see all your purchases. Hope it helps you and solves your problem.

UPDATE:

I'm going to copy & paste some text from developer docs (please read this doc because it explains everything great) and I hope this helps you:

The SDK Tester is a developer tool that allows users of the Amazon Mobile App SDK to test their implementation in a production-like environment before submitting it to Amazon for publication. This will allow developers to construct test cases that cover all responses generated by the Amazon Mobile App SDK APIs, and give them confidence their apps will be published and run correctly.

That means, you must use the AmazonSDKTester.apk for test in a production-like environment, once it works you can submit your app for publication.

The SDK Tester Uses a JavaScript Object Notation (JSON) text file to contain the IAP item information used to respond to IAP API calls. This file resides on the device containing the app under test and the SDK Tester. Once created, the file needs to reside on the device's file system under the path: /mnt/sdcard/amazon.sdktester.json

The click number doesn't decrease because when is clicked the button a SKU INVALID message is returned ( Look at the logcat ) due to no .json file is found in the sd card path.

gergonzalez
  • 2,488
  • 1
  • 22
  • 21
  • plz refer the image .....it is showing status as live but while deployment I have install amazon client since in production environment we need to have amazon client apk.Actually my question is asking for products which I have published via mobile distribution amazon ....u can see live as status of products in image number 2 posted above in question but the only think is in production environment I m not able to deploy it .. @gergonzalez – Venkat Apr 25 '13 at 09:55
  • First of all (because I can't understand you... sorry :S). Have you followed the steps I've written above? Have you got working the ButtonClicker demo app in your device? – gergonzalez Apr 25 '13 at 10:32
  • Yup I got in test environment thanks but stuck in production environment @gergonzalez – Venkat Apr 25 '13 at 10:39
  • In amazon, unlike iOS and Android GP, as far I remember, you can't test your app in "production environment". You must test your app in local using AmazonSDKTester and amazon.sdktester.json, as I explained above for the demo app, once this is working fine, then you can send your app to revision. I think you're trying to do the same implementation as in Android GP and it's quite different. – gergonzalez Apr 25 '13 at 10:53
  • Yesssss Thats what I m doing I need to work on production environment Can u plz tell me step s for the same How is production environment different from test environment? @gergonzalez – Venkat Apr 25 '13 at 11:03
  • If everything works fine in test environment, using AmazonSDKTester and amazon.sdktester.json, everything will work fine in production. I'll try later to ask another answer with the steps... – gergonzalez Apr 25 '13 at 11:52
  • @gergonzalez I am working on amazon inapp purchase(entitlement), can user cancel their purchase? If yes how we can catch call back for such things? – moDev Dec 27 '13 at 11:19
  • @droid dev look at this: http://stackoverflow.com/questions/17723130/how-to-detect-that-user-has-canceled-the-iap-on-kindle-fire – gergonzalez Jan 21 '14 at 16:03
0

Even i had faced the same issue:

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

If you also want a video link you can follow this:

VIDEO LINK

Finally its very well explained in Developer website Amazon Developer Link

Goofy
  • 6,098
  • 17
  • 90
  • 156
  • can anyone tell me abt real production enviorment working application ... i have published application from mobile distribution amazon and i got response that my application is in queue to publish but till then i cannot work on production enviroment WE NEED PRODUCTION ENV EXAMPLE when will application be placed from mobile distrubution ??? i have published since 6 days still it is under review status we need PRODUCTION enviroment application NOT TEST ENVIRONMENT – Venkat Apr 28 '13 at 13:27
  • @Venkat Yes in Amazon they will take some time to review your app and then then will publish so it will take some time, but there are also chances that they might reject your app due to some reasons and then again you might have to make changes and release – Goofy Apr 29 '13 at 05:09
  • @Venkat didnt it help you? if it has helped you please accept the answer – Goofy Apr 29 '13 at 18:55