Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Troubleshooting IAB on Amazon - Gideros Forum

Troubleshooting IAB on Amazon

PaulHPaulH Member
edited October 2015 in Plugins
I'm working on getting an app on Amazon. It's been live for over a year on iTunes and Google Play as a free app with in-app purchases. I have the app setup for the Amazon store with the same in-app products, all showing a "live" status on their developer console. I've been using the IAB plugin from http://giderosmobile.com/labs/iab, but that uses a deprecated version (1.x) of the Amazon purchasing library. The exported app built fine, and Amazon approved it, warning that it was incompatible with some newer Amazon devices due to the outdated IAP library.

In the Gideros source on GitHub I see the Amazon interface has been updated to use the current (2.x) version of the Amazon library: https://github.com/gideros/gideros/blob/master/plugins/iab/source/Android/src/com/giderosmobile/android/plugins/iab/frameworks/IabAmazon.java

Dropping that into my project, swapping in the new Amazon IAP library, and updating the manifest receiver element as per the current Amazon IAP sample, all builds and runs without errors, and Amazon approved the app, showing it compatible with all devices for which they test.

The problem is that IAB isn't actually working. Stepping through it in Eclipse I see that onUserDataResponse() is never called. That's a callback that should be called in response to PurchasingService.getUserData(), but it's not, so the Amazon IAB interface code decides that the IAP SDK is not accessible and gives up.

Has anyone encountered a similar situation and found a solution?

I'm basically grasping at straws at this point.

When you submit an app to Amazon they alter the APK, resigning the app. Does anyone know if that has to happen before the IAP will work? If so that would explain what I'm seeing when debugging in Eclipse, but not why the app delivered through the Amazon app store for live app testing isn't getting any response from the store. That would also be quite a barrier to further troubleshooting.

Any help would be greatly appreciated!

Paul

Comments

  • ar2rsawseenar2rsawseen Maintainer
    edited October 2015
    Interesting, I have an app published on Amazon with iap purchases which works great and even has some purchases there :)

    It uses in-app-purchasing-2.0.1.jar Amazon IAP SDK, and that is what I tested IAB interface with, which version do you have?

    And yes, debugging works a little different, you need an SDK tester app and a json file describing your iaps in the root of SD card for it to work.

    https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/testing-iap-2.0
  • PaulHPaulH Member
    edited October 2015
    I'm using in-app-purchasing-2.0.61.jar.

    If the debugging environment is preventing the callbacks from running, then perhaps my problem in the last app I submitted to Amazon was the manifest entry for the receiver. In that version I hadn't changed the receiver. The original IAB instructions call for:

    receiver android:name = "com.amazon.inapp.purchasing.ResponseReceiver"

    but sample Amazon provides with the jar file has a slight difference:
    receiver android:name="com.amazon.device.iap.ResponseReceiver"

    For your app did you use the latter?

    Paul
  • I had this one:
    <receiver android:name = "com.amazon.device.iap.ResponseReceiver" >
        <intent-filter>
            <action android:name = "com.amazon.inapp.purchasing.NOTIFY"
                  android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY" />
        </intent-filter>
    </receiver>
  • Thanks. That matches the changes I made earlier today. I've just resubmitted to Amazon, so I'm hoping that my problem was the manifest entry and the debugging environment.

    Thanks for your quick responses!

    Paul
  • The manifest change was the issue. My app is live on Amazon with IAB working as it should. Thanks again!

    Paul

    Likes: pie, ar2rsawseen

    +1 -1 (+2 / -0 ) Share on Facebook
Sign In or Register to comment.