Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Android / [SOLVED] AAB and Admob

Author
Message
lynnon
3
Years of Service
User Offline
Joined: 9th Nov 2020
Location:
Posted: 17th Oct 2021 18:03
Although I have gotten to the point I am ready to publish an app on android, I'm still very new to this process and I am stuck. I've signed up for admob and have been approved but I have several questions that I can't seem to find current answers to. To add admob to my app, do I only need to put the agk code in and then export as an AAB or do I have to export my app to android studio and then add the mobile ads sdk and then generate a bundle? If I find something I think might be the answer it's from a post or article from 2015 so I'm sure it's changed. If someone could point me in the direction I need to go I can probably figure the rest out from there but for right now I can't find anything current to help me answer this question. Thank you.

The author of this post has marked a post as an answer.

Go to answer

hosch
Developer
2
Years of Service
User Offline
Joined: 25th May 2021
Location:
Posted: 18th Oct 2021 10:28 Edited at: 18th Oct 2021 10:31
This post has been marked by the post author as the answer.
First of all, you don't need to use anything other than AppGameKit for your app development. What you need from the Google side to get ads running is the admob ID of the ad you've created for your app (format: ca-app-pub-XXXXXXXXXXXXXXXXX).

AGK wise, these commands are relevant to you: ShowFullscreenAdvertAdMob, SetAdMobTesting and SetAdMobDetails. Then it's simply a case of calling them once at the start of your app, ideally in a function, like so:



If you set SetAdMobTesting to 1, you will receive test ads. This is required, if you want to test the app yourself or click on the ads for testing purposes and is required in such circumstances. Otherwise Google can terminate your ads. It has to be called before calling SetAdMobDetails. When you want to show your ad, you use ShowFullscreenAdvertAdMob if it's a full screen ad. There are other forms of ads supported, too with their respective commands. That's it.
lynnon
3
Years of Service
User Offline
Joined: 9th Nov 2020
Location:
Posted: 18th Oct 2021 15:18
Thank you so much for this. You just made my day!
hosch
Developer
2
Years of Service
User Offline
Joined: 25th May 2021
Location:
Posted: 18th Oct 2021 19:14
No problem, glad I could help out.

Login to post a reply

Server time is: 2024-03-29 14:46:06
Your offset time is: 2024-03-29 14:46:06