question

Katie Lawrence avatar image
Katie Lawrence asked

Problems running the IAP Tester with the sample app

I have the ButtonClick app installed on my Kindle which is connected to my windows box via USB. I have the IAP tester app running on the emulator on windows. If I click buttons on the ButtonClick app I get a dialog asking to subscribe. If I agree to subscribe nothing happens. What am I missing?
iap
10 |5000 characters needed characters left characters exceeded

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

Anshul@Amazon avatar image
Anshul@Amazon answered
Based on your description it looks like the sample app & its corresponding JSON files have not been configured properly. Please follow the below steps to make the ButtonClicker app work. 1. Download In-App Purchasing SDK from developer portal. 2. It downloads with the file name Apps-SDK.zip 3. Unzip this file to your desktop. 4. Use "adb install In-App-Purchasing/tool/AmazonSDKTester.apk" command to install this tester app on your device or emulator. 5. Use "adb push In-App-Purchasing/tools/amazon.sdktester.json" /mnt/sdcard" command to copy the json on your device or emulator. 6. Open the ButtonClicker project in eclipse. 7. Put the In-App-Purchasing/lib/in-app-purchasing-1.0.3.jar in your classpath. 8. Run this project as Android Application. 9. You will see this App installed & launched in the emulator or devices connected to your system 10. Click on the button which has the lock symbol to purchase the app. 11. It pops up a window to Purchase. Click on purchase. (PS: If you are using emulator 2.3.X then you may not see the popup window. Since WebView is not supported in 2.3.X You can then use a version greater than 2.3 (4.0). This problem is specific with 2.3 emulators only)
10 |5000 characters needed characters left characters exceeded

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

Katie Lawrence avatar image
Katie Lawrence answered
My current app targets the original Kindle Fire, which is at 2.3 correct? Can I use IAP with that version? Is the problem just with the emulator? If so, how can I test without using the emulator? Do I have to move to Kindle Fire 2 and android 4.0 to use IAP? Thank you for your help.
10 |5000 characters needed characters left characters exceeded

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

Henderson@Amazon avatar image
Henderson@Amazon answered
Thank you for notifying us of the issue. We will investigate and will post a response to this thread or an Announcement to the forum, shortly. In the meantime, can you please provide specific details of the issue and any technical information you may have via the Contact Us form available at https://developer.amazon.com/help/contactus.html ?
10 |5000 characters needed characters left characters exceeded

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

Robert Campos avatar image
Robert Campos answered
I have the same issue. Was this resolved?
10 |5000 characters needed characters left characters exceeded

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

Robert Campos avatar image
Robert Campos answered
I found that my emulator did not have the JSON file in the mnt/sdcard directory. I tried using the console command, and the DDMS GUI File Explorer to transfer the file. I am recieving the following errors. From DDMS - File Explorer [2012-12-12 21:28:46 - ddms] transfer error: Read-only file system [2012-12-12 21:28:46] Failed to push selection: Read-only file system From Linux Console $ adb push /amazon.sdktester.json /mnt/sdcard/amazon.sdktester.json failed to copy '/amazon.sdktester.json' to '/mnt/sdcard/amazon.sdktester.json': Read-only file system Any ideas of how to solve this? Thanks in advance
10 |5000 characters needed characters left characters exceeded

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

Robert Campos avatar image
Robert Campos answered
ok, I figured it out. I didn't have a size assigned to my SD Card in the AVD manager. Duh! :\
10 |5000 characters needed characters left characters exceeded

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

Sachin@Amazon avatar image
Sachin@Amazon answered
Hi Robert, its good to know that you solved your issue. Surely this will help other developers in the forum. Thank you.
10 |5000 characters needed characters left characters exceeded

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

nick_amaseller2002 avatar image
nick_amaseller2002 answered
A follow up question on the JSON I just downloaded all the files and noticed that everything in the JSON file is commented out. Do we have to upload the file to device as is or un-comment sections? In the documentation related to this there is the following section: "The contents of the file is a list of JSON objects that should have the same properties as the IAP items that you entered into the Distribution Portal" Does that mean we have to enter these example IAP items in our Developer Portal and register the ButtonClicker example in our Developer Portal?
10 |5000 characters needed characters left characters exceeded

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

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Nick, Thank you for your post. The JSON file, comes with the sdk package, contains the examples (commented) how your item should be defined in the testing environment. You are supposed to create the JSON objects according to purchasable items of your apps. e.g. you have defined a item for your app in distribution portal. Item name - blue_button: SKU name - com.amazon.buttonclicker.blue_button Item Type - ENTITLED Title - Blue Button Description - Button Clicker - Now in Blue! smallIconUrl - http://some/image.jpg So while you would be testing the purchase flow in the app below object should be there in amazon.sdktester.json file placed in /mnt/sdcard/ "com.amazon.buttonclicker.blue_button" : { "itemType": "ENTITLED", "price": 0.99, "title": "Blue Button", "description": "Button Clicker - Now in Blue!", "smallIconUrl": "http://some/image.jpg" } You do not need to define items of ButtonClicker example app in your app in the portal. You will be running the ButtonClicker in sandbox environment, so defining the items in JSON file is only required here. In the portal, you need to define only the items you are targeting for your app. As you would not be able to test purchase flow for those items in live environment before submission, you should complete your testing by having the same items (with same information given in portal) in the amazon.sdktester.json file locally. Does it make sense?
10 |5000 characters needed characters left characters exceeded

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