In app purchase does nothing on Android with distribution build

First, here is the setup for testing this:

From what I’ve seen, this is correct.

Billing permissions are setup with Google Play via the manifest, and the com.ihmj.noads IAP product ID is Active in the Google Play developer console and has been for quite a while.

Google Play services such as Leaderboards and Achievements work just fine. We even have a beta build with testers. So everything on that front is all good to go.

So…

When trying this setup in the engine, it returns the strings “node executed” and “fail”, as expected.

When trying this setup on an Android device in a development build, it again returns the strings “node executed” and “fail”, as expected.

When in a distribution build, however, when Google Play services are all working and everything is dandy, pressing the button that triggers the IAP does nothing at all. It doesn’t even print the “node executed” string. Literally nothing happens. The other services still work just fine though.

This has been tested with the same results on the newest build, 4.7.6, and the previous build we were using, 4.6.1.

Is there some additional info needed in the manifest or DefaultEngine.ini, or something like that? And just to further clarify beyond what is really necessary, yes, I do have the billing permission unblocked in the manifest file.

What I think miiight be something, is that I had to add the bSupportsInAppPurchasing=True line under the [OnlineSubsystemIOS.Store] thing in the DefaultEngine.ini, but never saw anyone say anything about adding something similar for Android in that file. Is there some declaration needed there for Android?

And here’s some extra info that should really be interesting:

When testing the billing request with Google’s static response product IDs, it still doesn’t do anything. I used android.test.purchased, as instructed here:

Is it just me, or does this engine not support IAPs on Android?

Please, please, please prove me wrong here! :slight_smile:

Hi DC Gage,

Terence Burns was able to assist another user in this thread, it does in fact look like the issue was the bSupportsInAppPurchasing=True, and as luck would have it, the other user was packaging for Android so it has the Google Play version of that part of the ini. See if that helps.

Thanks!

Works! Thanks so much for finding that thread! You guys’ customer help is off the chain

The answer is in this thread, as pointed out by wittlief:

Assuming your Google Play services are up and running, and you have active IAPs ready in the Google dev console, simply add this to your DefaultEngine.ini:

[OnlineSubsystemGooglePlay.store]
bSupportsInAppPurchasing=True

My pleasure :smiley:

Does my app have to use to the Google Play services? I don’t actually need them and I’d like to avoid unnecessary stuff :wink:
I want InApp purchases though, but yeah, I can’t get it to work right now, is there any way without GooglePlay?
Thank you :slight_smile:

(And is the iOS subsystem necessary for iOS iAPs?)

I know that Apple requires you to do any IAPs through them. I imagine it’d work the same with Google. They function as your publisher, and are entitled to 30% of your revenue should you distribute an app through their services. That includes all purchases and ad revenue. For that reason, I really doubt they’d allow you to keep an app on their store that has a custom IAP service. Plus, you’d have to code it yourself. Those Blueprints are designed to specifically go through those services.

So honestly, it’d be a substantial amount of work to NOT use Google Play, and you run an almost certain chance of them taking down your app. The better route here is definitely to use their online services. However, you are not obligated to use their leaderboard or achievements if you wanna use IAPs.

Well I always thought Google Play is only for leaderboards etc. and iAPs aber something different, but I guess I was wrong, I didn’t intend to bypass Google/Apple here, I just didn’t want the leaderboards etc. :wink:
Thank you for your fast help!
Have a nice day!

Hmm. I’m actually not confident enough to give you an answer on that, since I’m using Google and Apple’s online services and Photon for multiplayer. I recommend posting that as a new question. There should be a few peeps here who can help you out.

No problem! Take care!

I’m sorry to bother you once again (last time, I promise :wink: ), but I intended to use the OnlineSubsystemNull in the future for WLAN-Matches between Android and iOS, can I still do that? (Because I have to add this

[OnlineSubsystem]
DefaultPlatformService=GooglePlay

in the DefaultEngine.ini instead of the NULL service :/)

I’m a little confused with the Platforms, I thought they are exclusive, sorry!

Okay, thanks anyways! :slight_smile: