Update Android Play Billing 5.0

I think i spoke too soon. It gets rid of errors but game just launches to black screen. Anywhere i can chat to get your help without blowing up this thread anymore?

yes, the black screen is caused by the reciever_exported not being implemetned properly into the engine, i told you, to go and set up the thing that fixes it, here: UNREAL 5.0.3 RECEIVER_EXPORTED error in gameactivity.java.template for 34+ api - #2 by araz01

i made this past, this fixes the reciever_exported issue, so you wont launch to a black screen. also, if your app is too big for google play, you’d want to then use google pad, which an updated version, which i also made post about you can use to fix it, just check posts above

Okay its fixed. I just didnt read close enough i guess. So just to be certain, i dont need UE 5.4.4 because you plugin has fixed it? Its working on play so i am assuming this is true. Billing, admob, everything should function correct?

hi, its not my plugin lol, its someone elses, and im just sharing it to help people. i dont know weather you need 5.4 or not, but, this plugin helps with iap, other with googlepad and some basic gameActivity editing to fix reciever issue on androids. cool.

1 Like

Well thank you for sharing it and for helping! I have fully tested 5.2 with thins plugin and am successfully deploying from play store with admob and in app purchases. I’m really excited because 5.4.4 was awful and I lost sleep over it. Now I need to figure out achievements!

1 Like

I spend days trying to figure out how to do this, so if you find the solution, I’ll be happy that you share it to us :stuck_out_tongue:

I definitely will! I will let you know!

I have this Plugin Play Base Services V2 and is not working!
5.3 FAIL
5.4 FAIL
I uninstalled and deleted the full Unreal Engine
5.3 FAIL
5.4 FAIL
The developer is very attentive and supportive but doesn’t explain anything, have checked all my settings and there are no errors. My project and credentials work perfectly with Firebase but not with this Plugin. Google Services and Play Games completely broken. I’m tired of almost 1 year trying to configure Play Games / IAP and spending money on things that promise and don’t work.

@luhpatez
Are you using the plugin mentioned above that updates play billing? I am using it on 5.2.1 and it took some tweeking. I got it to work tho.

I had to add these extra permissions in project settings, one of which requires a privacy policy.

You can use google sites to setup a webpage for your privacy policy, unless you already have a web page for your game. I used google sites because it is free. Then i googled “free game privacy policy” and it generated it all for me. Example: Privacy Policy | FormsTemplates

Without that in place and setup in the play console, you can’t take IAP because you are dealing with credit card info i guess. :man_shrugging:

I googled like crazy to get my license key but i had to totally fill all of this stuff out in project settings:

Once i was done there, it was as simple as this:

Added this event in my persistent level. the event can be ‘begin play’ i just have other things that have to load first.

In my widget where i made my store i added this:

To explain a bit, The product identifier is the EXACT name (case sensitive) of the name of the IAP i made in google play console:

tick “is consumable.” then all you need is the Make an in-app purchase v2 node connected to player controller.

The rest of that is a ref to my character (where the diamond value is stored), the increase of 10 diamonds, and then a save. The blood diamond use function node is just updating my HUD, and the save node is my personal saving function. Whatever your save system looks like, you would just replace that logic. I save here because i don’t want someone to buy, close the game/game crash/etc. and then i have to deal with them not having what they paid for.

Hope that helps some. When i got it working, it was far less complicated than i thought.

I am assuming you have already setup google cloud API, oAuth, and credentials? That was a mess for me but i stumbled through it somehow.

1 Like

P.s. I set it to .99 cents and when it came into my play console account, it was .67 cents so they are trimming off like a third of your money right out the gate.

1 Like

I’ve done everything you mentioned
Also using Google site
Consent Screen Verified
All permissions added
All credentials added
Google Signing Key SHA-1 | Android credential | Web application | Google Play Games
All linked. My credentials work perfectly on Firebase but not in the Plugin

I had uninstalled everything, all UE versions/Launcher. Deleted everything and installed it again and the error continues for both Play Games Login and Google Login.
Tried in only BP Projects and C++ Projects, removing plugins, changing gradle, making new empty projects, using different SDKs & NDKs, Same things happen using both versions 5.3/5.4 none worked.
I redid the Google Cloud Project, new credentials and NOTHING.

My full projects is perfect no errors in Play Console or UE Editor, but in the Play Console I have this message:
Integrate Integrity API
Add Play Games SDK to your production APK

Everything is set up and the dozens of APIs are also active, because on Firebase everything works

the integrity API is easy but i don’t think that halts IAPs. I linked the cloud project and left the box unchecked. Looks like you already did this so i don’t think that message means anything right?

1 Like

Hey there! I have been struggling with android ads. Did you have to add stuff to your build.cs file to get ads to work?

Yes, you need to modify 2 files:

  • Target.cs

Add these lines under “DefaultBuildSettings = BuildSettingsVersion.V2;

if (Target.Platform == UnrealTargetPlatform.Android)
{
ExtraModuleNames.Add(“OnlineSubsystemGooglePlay”);
ExtraModuleNames.Add(“OnlineSubsystem”);
ExtraModuleNames.Add(“AndroidAdvertising”);
}

  • Build.cs

Add these lines under “// PrivateDependencyModuleNames.Add(“OnlineSubsystem”);

PrivateDependencyModuleNames.Add(“OnlineSubsystem”);
PrivateDependencyModuleNames.Add(“AndroidAdvertising”);

Hey, thank you again! I have all of that added all that and still got the build error for android ads lite. For anyone else struggling just to get a build on the settings mentioned in this thread, i saw this post:

android - AAPT: error: unexpected element found in - Stack Overflow

Looks like they are discussing unity in the post, but the guy was right. In my case ads 22.6 was causing the build error. i changed it to 22.1.

Also i had to upgrade my gradle version. i used the description of how to get there in the engine files using this thread:

I went to C:\Program Files\Epic Games\UE_engine version\Engine\Build\Android\Java\gradle* and changed my gradle version to 3.5.3. I’m not willing to try a higher version, because this one worked for me.

the i went to: C:\ProgramFiles\EpicGames\UE_engineversion*\Engine\Build\Android\Java\gradle\gradle\wrapper and opened
“gradle-wrrapper.properties”

I changed the version number at the end of dist URL to 6.7.1

This allowed me to build with the updated .APL file and the added text to .build and .target

@Herlehos many thanks to you. I’m looking at my first banner test ad on a packaged build. I almost gave up… haha


@Skyboy
Let me stand by your side. I’m also developing totally offline (scientific and educational) apps with UE.

To be more precise I work in UE 4.25. Now, at September 2024, GooglePlay forces all developers to update all apps with targetSDK 33+, which requires full recompile of apps, so all these problems become mine too. Yes, despite I don’t use this lib, I tried to just update this IAP Billing lib, like shown in this popular answer, but it’s now use for UE 4, because it’s bound to Android NDK b21e, and Gradle 3.5.4 with corresponding old build tools, not compatible with new billingclient 6.1.0 (required by GP Console at this moment).

So, if you, like me, developing offline apps, without any monetization and ads, and want just to DISABLE IAP in jour project, in UE 4 and UE 5, add this lines in your AndroidEngine.ini (Reference) and recompile (pack) your project.

[Project_Dir]\Config\Android\AndroidEngine.ini

[OnlineSubsystem]
DefaultPlatformService=GooglePlay
[OnlineSubsystemGooglePlay.Store]
bSupportsInAppPurchasing=False