Insality Insality - 8 days ago 11
Android Question

New Unity In-App Purchase integration (Android)

Im trying to integrating new Unity inapp serivice and got the next problem:

I created project on google play (now it is only in Alpha-testing with no-publishing) and i created in-app content for purchasing. In unity editor all works well, but when im trying run its on device got next:

*Unavailable product coins500 -**.coins500 OnInitializeFailed InitializationFailureReason:NoProductsAvailable*

Google play API key inserted in Code by builder.setPublicKey() and in unity analytics dashboard The app have permission on BILLING

Why i cant get the product from the GP?

Edit: Just finded this topic: http://docs.unity3d.com/Manual/UnityIAPGooglePlay.html Now im trying to publish my application and test IAP again. Possibly problem in this.

Edit2: Publishing my app dont help me with my question. Any solutions? Still see my products are unaviable. OnInitializeFailed InitializationFailureReason:NoProductsAvailable

Answer

OK, here's an amazing tip,

With google IAB, in fact, it will only work once you download it as a beta from the playstore, it will NOT work if you just load the .apk locally.

it's incredibly annoying, but that's how it is.

Note that - in contrast - when you are using PlayGames (to post achievements and so on), you can in fact just load it as an apk locally, and the achievements will work. (Again, actual IAB will not work.)

You must get it on playstore as a beta, and then load it that way.

AND you must be a registered beta tester on playstore for the app.

(And!!!!!!!! Don't forget, google actually charges you when you test it, you literally need your credit card / paypal / whatever all working to test purchases.) (You can instantly get a refund, but you must have credit card working so you can buy stuff for real on the playstore.)

Note that in contrast

with Apple iOS IAP, it's fine to build, sign and load locally from Xcode - you can then test Apple IAP that way. You do not have to wait for it to be on TestFlight. But not with Android!

So it's different on the two platforms.

Comments