question

Chris Barrett avatar image
Chris Barrett asked

[SOLVED] IAP SDK 3.0.2 sandbox failures

Hi

I'm rebuilding an existing android app for Amazon Fire OS. However I'm stuck with IAPs.
When in production mode, my callbacks for onUserDataResponse, onProductDataResponse, etc. get called with a FAILURE code, as expected.

However, when I set debug.amazon.sandboxmode to debug, the callbacks never happen.

I've confirmed the IAP JSON file sat in my device's /mnt/sdcard folder is being picked up by Amazon App Tester, and additionally, if I set User Account Settings to be "logged out" I see warnings in the device log about the user not being logged in, but again, nothing in my own app.

AndroidManifest.xml has the receiver and queries sections set up, as per the documentation:

  <receiver android:name = "com.amazon.device.iap.ResponseReceiver"
    android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY" >
    <intent-filter>
      <action android:name = "com.amazon.inapp.purchasing.NOTIFY" />
    </intent-filter>
  </receiver>
...
    <queries>
        <package android:name="com.amazon.venezia"/>
    </queries>


I did initially think it was related to Game Mode being enabled and killing all background apps (including App Tester), but I have since disabled that with no change observed.

Fire OS 7.3.2.2, Amazon SDK 3.0.2, built using Android Studio 2020.3.1P2, compileSdkVersion 30, minSdkVersion 25, targetSdkVersion 30.

I am also seeing log entries for:

AUTH_TOKEN_VERIFICATION_FAILURE: null: null


But the only assistance I can see in the documentation for that error is related to the AppstoreAuthenticationKey.pem not being present. It is, and is the latest from my developer console.

This has been driving me nuts for too long now, any help would be greatly appreciated!

iapfire tabletandroidsdk
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

Chris Barrett avatar image
Chris Barrett answered

OK I solved this, for my particular case at least.

I have two product flavours set up. One for Google Play, the other for Amazon. My <receivers> weren't merging into the Amazon AndroidManifest.xml correctly, so my app wasn't capable of receiving the notifications from the Amazon Test App. Sorted that out, now I get the callbacks.

10 |5000

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