onepf / OpenIAB

Open In-App Billing for Google Play, SlideMe, Amazon Store, Nokia Store, Samsung Apps, Yandex.Store, Appland, Aptoide, AppMall and Fortumo.
http://onepf.org/openiab/
Apache License 2.0
476 stars 171 forks source link

How to check Amazon IAP? #473

Closed deko519 closed 9 years ago

deko519 commented 9 years ago

Hi!

Your library is just great and convenient, but we can't test Amazon IAP! Please advise! All information below:

We use OpenIAB v0.9.8.2 and Nexus 2012, android v4.4.

We did all steps described here: https://github.com/onepf/OpenIAB/wiki/How-To-support-Amazon-Appstore#test

We've got amazon.sdktester.json placed in mnt/sdcard and AmazonSDKTester.apk installed.

Our code is: OpenIabHelper.Options.Builder builder = new OpenIabHelper.Options.Builder() .setStoreSearchStrategy(OpenIabHelper.Options.SEARCH_STRATEGY_INSTALLER) .addAvailableStoreNames(OpenIabHelper.NAME_AMAZON) .addPreferredStoreName(OpenIabHelper.NAME_AMAZON) .setVerifyMode(OpenIabHelper.Options.VERIFY_SKIP) .addStoreKeys(storeKeys); mHelper = new OpenIabHelper(activity, builder.build());

We tried both: adb install -i com.amazon.venezia /path/to/YourApp.apk adb install -i com.amazon.apps /path/to/YourApp.apk

The log is here (for -i com.amazon.venezia log is the same): 04-16 20:30:58.704 4126 4126 D OpenIAB : startSetup() options = Options={availableStores=[], availableStoreNames=[com.amazon.apps], preferredStoreNames=[com.amazon.apps], discoveryTimeoutMs=0, checkInventory=false, checkInventoryTimeoutMs=0, verifyMode=1, storeSearchStrategy=0, storeKeys={com.google.play=}, samsungCertificationRequestCode=899} 04-16 20:30:58.704 4126 4126 D OpenIAB : setupWithStrategy() store search strategy = 0 04-16 20:30:58.704 4126 4126 D OpenIAB : setupWithStrategy() package name = com.dikobraz.magiccards1hdlite 04-16 20:30:58.704 4126 4126 D OpenIAB : setupWithStrategy() package installer = com.amazon.apps 04-16 20:30:58.714 4126 4126 D OpenIAB : packageInstalled() is false for com.amazon.apps 04-16 20:30:58.714 4126 4126 D OpenIAB : finishSetup() === SETUP DONE === result: IabResult: 3, No suitable appstore was found (response: 3:Billing Unavailable) Appstore: null

If we use .setStoreSearchStrategy(OpenIabHelper.Options.SEARCH_STRATEGY_INSTALLER_THEN_BEST_FIT) in-app initializes with Google Play and everything goes well, but we need to need Amazon version.

RomanZhilich commented 9 years ago

Hm, seems like you did everything right. Do you have Amazon store installed? Did you use AmazonSDKTester or AmzonAppTester? Because first one seems to be deprecated. Also you should install App Tester from Amazon Store.

deko519 commented 9 years ago

Hi Roman, Thank you for pointing me on this. It was SDKTester. I installed AppTester, but nothing changed. Log is the same (response 3: billing unavailable). As for my environment see screenshots attached. Do you have any ideas?

screenshot_2015-04-20-12-42-53 screenshot_2015-04-20-12-39-09

akarimova commented 9 years ago

linked to #482

deko519 commented 9 years ago

Any news?

deko519 commented 9 years ago

Everything works fine! Thank you!