Comments (14)
Sorry, haven't tested the Amazon store. What the error concerns I would try to check the following:
A) are you using the correct key? Is there actually a key???
B) is the key correctly formatted (spaces, line breaks, encoding...)?
You could check https://github.com/onepf/OpenIAB/ how they do it.
from gdx-pay.
hmm
the sample:
https://github.com/onepf/OpenIAB/blob/dev/samples/trivialdrive/src/main/java/org/onepf/sample/trivialdrive/InAppConfig.java
doesnt use a key for amazon store!?
// STORE_KEYS_MAP.put(OpenIabHelper.NAME_AMAZON,
// "Unavailable. Amazon doesn't support RSA verification. So this mapping is not needed");
is that correct?
if i set the key = "" then i get:
java.lang.IllegalArgumentException: Store public key can't be null or empty value.
if i set the correct key then i get:
java.lang.IllegalArgumentException: Invalid publicKey for store: com.amazon.apps, key: .....
see also:
onepf/OpenIAB#125
from gdx-pay.
....
after further investigation:
if i startup gdx-pay with deactivated: config.addStoreParam(PurchaseManagerConfig.STORE_NAME_ANDROID_AMAZON, AMAZONKEY);
then i get:
PurchaseObserver: handleInstallError!: Problem setting up in-app billing: IabResult: 3, Billing isn't supported (response: 3:Billing Unavailable)
it seems like there is something to fix about the amazon - IAP via our openIAB backend....
from gdx-pay.
Yes, looks like there is no key needed for Amazon. For testing I assume you are testing on a non-Amazon device!? Did you install the Amazon Tester:
Unless you install the Amazon Tester app on your device, billing won't work. Did you do that?
from gdx-pay.
@noblemaster
i am testing on an amazon fire tv ......not sure if the tester app is needed in that case.
i will investigate.
but does your iab-purchasemgr support IAP without submitting a key?
from gdx-pay.
I guess in that case there should be an Amazon store installed and you won't need the tester app! How did you install the app on Amazon Fire TV? Did you make sure the Amazon signature is in there (install signature) when you copy it over?
but does your iab-purchasemgr support IAP without submitting a key?
Yes. Simply don't supply a key for Amazon and you are good.
from gdx-pay.
@noblemaster
hm... i just sideloaded directly from eclipse run as .....
which amazon signature do you mean? sorry for asking newbie questions :)
from gdx-pay.
Maybe "signature" is the wrong name. Here is how you do it:
https://github.com/onepf/OpenIAB/wiki/How-To-support-Amazon-Appstore#test
When you install your app, make sure to do it with
adb install -i com.amazon.venezia /path/to/YourApp.apk".
Maybe you are also able to pass in "com.amazon.venezia" when you launch it via Eclipse, but not sure how/if that actually works???
from gdx-pay.
ok got it....
but there is still something wrong.... i dont submit a store key now and i sideloaded via adb install -i com.amazon.venezia ....
11-12 14:55:44.503: I/IAP(21439): IAP: gdx-pay successfully instantiated.
11-12 14:55:44.503: I/AndroidInput(21439): sensor listener setup
11-12 14:55:44.513: I/PurchasingManager(21439): Purchasing Framework initialization complete. Build ID 1.0.3
11-12 14:55:44.513: D/PurchasingManager(21439): In App Purchasing SDK - Sandbox Mode: PurchasingObserver registered: org.onepf.oms.appstore.AmazonAppstoreBillingService@412ede48
...
11-12 14:55:46.635: E/AndroidRuntime(21439): java.lang.IllegalStateException: Wrong setup state: 3
11-12 14:55:46.635: E/AndroidRuntime(21439): at org.onepf.oms.OpenIabHelper.setupStateToString(OpenIabHelper.java:1024)
11-12 14:55:46.635: E/AndroidRuntime(21439): at org.onepf.oms.OpenIabHelper.checkSetupDone(OpenIabHelper.java:989)
11-12 14:55:46.635: E/AndroidRuntime(21439): at org.onepf.oms.OpenIabHelper.queryInventoryAsync(OpenIabHelper.java:919)
11-12 14:55:46.635: E/AndroidRuntime(21439): at com.badlogic.gdx.pay.android.openiab.PurchaseManagerAndroidOpenIAB.purchaseRestore(PurchaseManagerAndroidOpenIAB.java:316)
11-12 14:55:46.635: E/AndroidRuntime(21439): at com.badlogic.gdx.pay.PurchaseSystem.purchaseRestore(PurchaseSystem.java:159)
11-12 14:55:46.635: E/AndroidRuntime(21439): at de.philweb.philengine.common.PlatformResolver.requestPurchaseRestore(PlatformResolver.java:40)
11-12 14:55:46.635: E/AndroidRuntime(21439): at de.philweb.game2.screens.LoadingAsyncScreen.(LoadingAsyncScreen.java:112)
11-12 14:55:46.635: E/AndroidRuntime(21439): at de.philweb.game2.common.Tanks.getStartScreen(Tanks.java:174)
from gdx-pay.
Setup state 3 is defined as SETUP_IN_PROGRESS:
https://github.com/onepf/OpenIAB/blob/dev/library/src/main/java/org/onepf/oms/OpenIabHelper.java#L108
Are you waiting for the purchase observer's handleInstall() to be called before you call purchaseRestore. Looks like you are trying to do a purchase restore while the purchase manager for Amazon is still being set up!?
from gdx-pay.
Hi @noblemaster
I can check that, but i do it the same way on Google play and ouya. So IF it works there it should work for amazon also.....
Bye
Phil
from gdx-pay.
Good point. On the other hand, I just wrapped OpenIAB, so if it works for Google Play, it should also work for all the other stores including Amazon. I haven't added specific Amazon-code. Have you looked closer at OpenIAB to see how they do it there?
from gdx-pay.
hi @noblemaster
i just checked again....if i dont submit a key i get:
java.lang.IllegalArgumentException: Store public key can't be null or empty value.
at org.onepf.oms.OpenIabHelper$Options$Builder.checkStoreKeyParam(OpenIabHelper.java:1469)
at org.onepf.oms.OpenIabHelper$Options$Builder.addStoreKeys(OpenIabHelper.java:1508)
at com.badlogic.gdx.pay.android.openiab.PurchaseManagerAndroidOpenIAB.install(PurchaseManagerAndroidOpenIAB.java:218)
at com.badlogic.gdx.pay.PurchaseSystem.install(PurchaseSystem.java:153)
at de.philweb.bubblr2HD.tools.PlatformResolver.initializeIAP(PlatformResolver.java:25)
from gdx-pay.
Are you passing in a "null"-key for Amazon? I think not passing in anything for Amazon at all might actually do the trick?
from gdx-pay.
Related Issues (20)
- gdx-pay iOS crashes on iOS < 11.2 HOT 1
- Remove gdx-pay-iosmoe-apple HOT 6
- PurchaseManagerGoogleBilling.purchaseRestore() doesn't return any purchases since v1.0.0 HOT 2
- java.lang.IllegalStateException: Cannot support OfferType Subscription and other types in the same app HOT 4
- PurchaseManager does not support consumables and subscriptions at the same time. HOT 3
- iOS app rejected by the App Store HOT 7
- NPE on start of the app (getTransactionDate() or getTransactionDate().toDate() is null) HOT 3
- Consume item manually HOT 5
- error: cannot find symbol class PurchaseSystem HOT 8
- Pending purchases HOT 4
- Google play billing upgrade ? HOT 21
- v1.3.3 not working with google - PurchaseManagerGoogleBilling.onProductDetailsResponse failed, error code is -2 HOT 3
- Free trial no longer detected on Android
- crash logs seen from Firebase after upgrading the gdx-pay from 1.3.1 to 1.3.4 HOT 5
- SecurityException with gdx-pay on Android HOT 3
- The version of Amazon IAP is quite outdated. HOT 4
- Googlebilling compatibility with Android 14 HOT 1
- gdx-pay-android-googlebilling uses an outdated version of com.android.billingclient HOT 3
- Do I need to implement iOS and Android specific PurchaseManager? HOT 1
- Can I use different PurchaseObserver in one PurchaseManager for different screen?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdx-pay.