Giter Club home page Giter Club logo

Comments (14)

noblemaster avatar noblemaster commented on May 18, 2024

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.

just4phil avatar just4phil commented on May 18, 2024

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.

just4phil avatar just4phil commented on May 18, 2024

....
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.

noblemaster avatar noblemaster commented on May 18, 2024

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.

just4phil avatar just4phil commented on May 18, 2024

@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.

noblemaster avatar noblemaster commented on May 18, 2024

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.

just4phil avatar just4phil commented on May 18, 2024

@noblemaster
hm... i just sideloaded directly from eclipse run as .....
which amazon signature do you mean? sorry for asking newbie questions :)

from gdx-pay.

noblemaster avatar noblemaster commented on May 18, 2024

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.

just4phil avatar just4phil commented on May 18, 2024

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.

noblemaster avatar noblemaster commented on May 18, 2024

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.

just4phil avatar just4phil commented on May 18, 2024

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.

noblemaster avatar noblemaster commented on May 18, 2024

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.

just4phil avatar just4phil commented on May 18, 2024

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.

noblemaster avatar noblemaster commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.