I hooked our game up to the amazon store using the ButtonClicker sample as a base framework. I am trying to implement the storefront and so building a catalog of purchasable items within the onItemDataResponse
callback. But this along with onGetUserIdResponse
are never called. But the sdk tester is logging successful Item Data Response BroadCasts and UserID Response BroadCasts and logging the contents of the amazon.sdktester.json. Note the onSdkAvailable
is being called. How can I get around this?
2 Answers
I just had the same problem you described. ( I was getting no callback in from the purchasing manager )
In my manifest i had:
<receiver android:name = "com.amazon.inapp.purchasing.ResponseReceiver"
android:exported="false" >
<intent-filter>
<action android:name = "com.amazon.inapp.purchasing.NOTIFY" android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY" />
</intent-filter>
</receiver>
Removing the android:exported="false" attribute resolved the problem for me. Originally I had added the android:exported="false" attribute because it removes the warning "exported receiver requires no permission"
Now my manifest looks like this and in app purchasing can be properly tested using the sdk tester:
<receiver android:name = "com.amazon.inapp.purchasing.ResponseReceiver" >
<intent-filter>
<action android:name = "com.amazon.inapp.purchasing.NOTIFY" android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY" />
</intent-filter>
</receiver>

- 353
- 3
- 13
First, if you are testing, make sure that the SDK Tester app is installed and you have uploaded an amazon.sdktester.json
file to /mnt/sdcard/
on your device or emulator (as described here).
The onSdkAvailable
callback is invoked without requiring any IPC, so it does not indicate that you are communicating with the client or tester app.
Also, make sure you have declared the receiver in the manifest. From the Amazon docs:
<receiver android:name="com.amazon.inapp.purchasing.ResponseReceiver" >
<intent-filter>
<action android:name="com.amazon.inapp.purchasing.NOTIFY"
android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY" />
</intent-filter>
</receiver>
(On a side note, the android:permission
attribute on the <action>
tag doesn't do anything. However, if you move it to the <receiver>
tag where it belongs, you again won't receive broadcasts—at least from the SDK Tester app, and maybe from the IAP Client as well. You can leave it as the docs suggest or simply delete the android:permission
attribute; see this thread.)

- 232,168
- 48
- 399
- 521