Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon purchasing API error: com.amazon.testclient.iap.purchase not found

Logcat Entries

11-26 11:16:29.033: W/ActivityManager(61): Unable to start service Intent{ act=com.amazon.testclient.iap.purchase flg=0x10000000 (has extras) }: not found
11-26 11:16:29.133: W/InputManagerService(61): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40611088
11-26 11:21:06.059: D/SntpClient(61): request time failed: java.net.SocketException: Address family not supported by protocol
like image 707
Varsha Avatar asked Dec 21 '22 13:12

Varsha


1 Answers

Amazon differs from Google's PlayStore in that you cannot test purchases with Amazon's servers at all, until your app has been approved and published:

Only apps that have been approved and published through the Distribution Portal can communicate with the Amazon Client.
https://developer.amazon.com/sdk/in-app-purchasing/documentation/testing-iap.html

So until that point, your only option for debugging and testing purchases is to use the Amazon Tester app which emulates the Amazon store.

This line means the Amazon API is requesting Amazon's SDK tester App but it is not installed on your device:

11-26 11:16:29.033: W/ActivityManager(61): Unable to start service Intent{ act=com.amazon.testclient.iap.purchase flg=0x10000000 (has extras) }: not found

Amazon Tester App + JSON file

The Amazon Tester app is packaged with the SDK. You will need to side load it onto your device and also create and install a json file describing the products it should emulate purchases for.

It is worth running your JSON file through an online validator tool before installing on your device as errors are hard to spot, and the SDK tester app doesn't make it obvious when there is a problem.

Using external Receipt Verification

If you are verifying purchase receipts with Amazon on a server outside of your app, then you will also need to set-up a server running Amazon's RVS Sandbox code so it can emulate Amazon's Receipt verification service. You will then need to point your original server to this sandbox server instead of Amazon's live receipt verification servers.

The RVS Sandbox is a .war file, you should look at something like Jetty to run the code and and use this to verify your receipts during development instead of Amazon's servers.

More information:

Look for the following headings on this website:
Creating the JSON Data File
Working with the Receipt Verification Sandbox
https://developer.amazon.com/sdk/in-app-purchasing/documentation/testing-iap.html

like image 142
JonoB Avatar answered Mar 08 '23 04:03

JonoB