title: Amazon IAP Android PurchasingListener never called
body: <p>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.</p>
  <p>The ResponseReceiver has following structure in Manifest:</p>
  <pre><code>&lt;receiver android:name = &quot;com.amazon.device.iap.ResponseReceiver&quot;
          android:permission = &quot;com.amazon.inapp.purchasing.Permission.NOTIFY&quot;
          android:exported=&quot;true&quot;&gt;
          &lt;intent-filter&gt;
              &lt;action android:name = &quot;com.amazon.inapp.purchasing.NOTIFY&quot; /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  </code></pre>
  <p>I register PurchaseListener in onCreate():</p>
  <pre><code>PurchasingService.registerListener(this.getApplicationContext(), purchasingListener);
  </code></pre>
  <p>Then make this call in onStart()</p>
  <pre><code>final Set&lt;String&gt; productSkus = new HashSet&lt;String&gt;();
          for (final MySku mySku : MySku.values()) {
              productSkus.add(mySku.getSku());
              Log.d(TAG, &quot;onStart: call getProductData for skus: &quot; + mySku.getSku());
          }
  
          PurchasingService.getProductData(productSkus);
  </code></pre>
  <p>and finally in onResume():</p>
  <pre><code>PurchasingService.getUserData();
  PurchasingService.getPurchaseUpdates(false);
  </code></pre>
  <p>Nothing from these call had returned any response. The Listener itself is registeres, as I can see in logs:</p>
  <pre><code>2022-07-27 18:50:14.791 11790-11790/......amazon D/d: Appstore SDK - Sandbox Mode: PurchasingListener registered: ......amazon.iap.SamplePurchasingListener@b3c6192
  </code></pre>
  <p>It is important to say, that if I am using old style receiver structure in Manifest (without &quot;android:permission = &quot;com.amazon.inapp.purchasing.Permission.NOTIFY&quot; under &lt;receiver tag), like here:</p>
  <pre><code>&lt;receiver android:name = &quot;com.amazon.device.iap.ResponseReceiver&quot;
          android:exported=&quot;true&quot;&gt;
          &lt;intent-filter&gt;
              &lt;action android:name = &quot;com.amazon.inapp.purchasing.NOTIFY&quot;
                  android:permission = &quot;com.amazon.inapp.purchasing.Permission.NOTIFY&quot;/&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  </code></pre>
  <p>, I am getting some responses, but very frustrating, since it is not what is expected to be, and this permission is highlighted with err:</p>
  <pre><code>Protecting an unsupported element with a permission is a no-op and potentially dangerous
  </code></pre>
  <p>The logs in this case show:</p>
  <pre><code>2022-07-27 19:07:11.673 12723-12723/.....amazon D/e: Appstore SDK - Sandbox Mode: sendGetUserDataRequest
  2022-07-27 19:07:11.684 12723-12723/.....amazon D/e: Appstore SDK - Sandbox Mode: sendPurchaseUpdatesRequest/sendGetUserData first:e0656912-440d-4c7d-a864-0548028a803d
  2022-07-27 19:07:11.743 12723-12723/.....amazon D/e: Appstore SDK - Sandbox Mode: handleResponse
  2022-07-27 19:07:11.895 12723-12723/......amazon D/IAPListener: onProductDataResponse: RequestStatus (SUCCESSFUL)
  2022-07-27 19:07:11.897 12723-12723/.....amazon D/IAPListener: onProductDataResponse: successful.  The item data map in this response includes the valid SKUs
  2022-07-27 19:07:11.897 12723-12723/...amazon D/IAPListener: onProductDataResponse: 0 unavailable skus
  </code></pre>
  <p>... and no other things are out there. Button for puchasing is dead and no other responses!</p>
  <p>I don't minify the code with Proguard.</p>
  <p>Testing device Amazon Fire 7 Tablet.</p>
  <p>Target SDK - 32.</p>
  <p>I stuck here for a long time, will be highly grateful if anyone could help me with this question!</p>
  <p>Thank you in advance...</p>
  <p>===========
  Update 1:</p>
  <p>On different testing devices the result is different. On Amazon Fire 7 Tablet all is dead. But on Xiaomi Redmi S2 PurchasingListener is alive but gives empty data for products. Here is the logs:</p>
  <pre><code>... D/IAPListener: onUserDataResponse: get user id (l3HL7XppEMhrOGDnur9-ulvqomrSg6qyODKmah76lJU=, marketplace (US) 
  ... D/IAPListener: onProductDataResponse: RequestStatus (SUCCESSFUL)
  .... D/IAPListener: onProductDataResponse: successful.  The item data map in this response includes the valid SKUs
  .... D/IAPListener: onProductDataResponse: response.getProductData(): {}
  .... D/IAPListener: onProductDataResponse: 0 unavailable skus
  .... D/IAPListener: onPurchaseUpdatesResponse: requestId (a5db322e-d894-4ebf-896a-9007140c91d2) purchaseUpdatesResponseStatus (SUCCESSFUL) userId ()
  </code></pre>
  <p>The same is on Samsung Galaxy Tab A</p>