Sargius avatar image
Sargius asked

Amazon IAP Android PurchasingListener never called

I am trying to implement a subscription IAP on Android using the Amazon SDK (3.0.3). I made all things as described in Amazon appropriate documentation and their sample app and configured Amazon App Tester properly. However have no luck, I am getting no responses from PurchasingListener.

The ResponseReceiver has following structure in Manifest:

<receiver android:name = ""

android:permission = ""



<action android:name = "" />



I register PurchaseListener in onCreate():

PurchasingService.registerListener(this.getApplicationContext(), purchasingListener);

Then make this call in onStart()

final Set<String> productSkus = new HashSet<String>();

for (final MySku mySku : MySku.values()) {


Log.d(TAG, "onStart: call getProductData for skus: " + mySku.getSku());



and finally in onResume():



Nothing from these call had returned any response. The Listener itself is registeres, as I can see in logs:

2022-07-27 18:50:14.791 11790-11790/ D/d: Appstore SDK - Sandbox Mode: PurchasingListener registered:

It is important to say, that if I am using old style receiver structure in Manifest (without "android:permission = "" under <receiver tag), like here:

<receiver android:name = ""



<action android:name = ""

android:permission = ""/>



, I am getting some responses, but very frustrating, since it is not what is expected to be, and this permission is highlighted with err:

Protecting an unsupported element with a permission is a no-op and potentially dangerous

The logs in this case show:

2022-07-27 19:07:11.673 12723-12723/ D/e: Appstore SDK - Sandbox Mode: sendGetUserDataRequest

2022-07-27 19:07:11.684 12723-12723/ D/e: Appstore SDK - Sandbox Mode: sendPurchaseUpdatesRequest/sendGetUserData first:e0656912-440d-4c7d-a864-0548028a803d

2022-07-27 19:07:11.743 12723-12723/ D/e: Appstore SDK - Sandbox Mode: handleResponse

2022-07-27 19:07:11.895 12723-12723/ D/IAPListener: onProductDataResponse: RequestStatus (SUCCESSFUL)

2022-07-27 19:07:11.897 12723-12723/ D/IAPListener: onProductDataResponse: successful. The item data map in this response includes the valid SKUs

2022-07-27 19:07:11.897 12723-12723/ D/IAPListener: onProductDataResponse: 0 unavailable skus

... and no other things are out there. Button for puchasing is dead and no other responses!

I don't minify the code with Proguard.

Testing device Amazon Fire 7 Tablet.

Target SDK - 32.

I stuck here for a long time, will be highly grateful if anyone could help me with this question!

Thank you in advance...

iapamazon appstoreandroidsdk
10 |5000

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

1 Answer

Levon@Amazon avatar image
Levon@Amazon answered

Hi Sargius,

I assume it's some sort of a setup / configuration error? I would suggest running a sample app included in the SDK to ensure that IAP works at all for you (it should).

As for your specific case:
- in the manifest, the permission should be attached to the receiver, and not to action. So the correct way is to have it just like it's described in the documentation:

  <receiver android:name = ""
      android:permission = "">
      <action android:name = "" />

- ensure that you exported correct IAP items from your Developer Portal account, for the app that you are testing.
- could you please try to reduce the targetSdkVersion to something like 28, and see if it works for you?

10 |5000

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