Android AdMob Implementation

T

TinyGamesLab

Guest
GM Version: 1.4 (2.0 uses the same code)
Target Platform: ALL
Download: N/A
Links: see video below

Summary:
This a quick tutorial teaching you how to set-up AdMob on your game maker studio in order to add some ads to your game.
I'll teach you how to add banner, interstitial and rewarded video ads to your game, by using some objects to call those ads, and show you the final result in my own mobile.
It's a quick and easy implementation that could render some revenue for your game!
 

DigiChain

Member
Great tutorial, thank you!
There's no information on GDPR though - and specifically how we pass on permission to Admob to either show personalised or non-personalised ads. I wonder if this could be explained too?
 

Mert

Member
Great tutorial, thank you!
There's no information on GDPR though - and specifically how we pass on permission to Admob to either show personalised or non-personalised ads. I wonder if this could be explained too?
There are some code left in the extension, but consent-collecting does not work.
However, as Google implemented before, when requesting an ad, if you add the parameter "npa=1" to the request, Admob will pull a non-personalized ad for it. I currently use this to serve personalized ads in my app Word Chain

For consent, I made a simple UI with two buttons(You can either accept to get personalized ad, or non-personalized one), and save this to "data.ini". The leftover scripts include one : GoogleMobileAds_ConsentSetAllowPersonalizedAd(true/false);

Setting it;
TRUE = Gets you NON-personalized ad.
FALSE = Gets you personalized ad.
 
There are some code left in the extension, but consent-collecting does not work.
However, as Google implemented before, when requesting an ad, if you add the parameter "npa=1" to the request, Admob will pull a non-personalized ad for it. I currently use this to serve personalized ads in my app Word Chain

For consent, I made a simple UI with two buttons(You can either accept to get personalized ad, or non-personalized one), and save this to "data.ini". The leftover scripts include one : GoogleMobileAds_ConsentSetAllowPersonalizedAd(true/false);

Setting it;
TRUE = Gets you NON-personalized ad.
FALSE = Gets you personalized ad.
Hi
Can you make a step-by-step tutorial?
 

Mert

Member
Hi
Can you make a step-by-step tutorial?
No need. It's simple.
Throughout your game, before loading any ad(Banner/Rewarded/Interstitial), use GoogleMobileAds_ConsentSetAllowPersonalizedAd(false);
You can use this function in any event in your game. Using this will fetch you PERSONALIZED AD.
 
GM Version: 1.4 (2.0 uses the same code)
Target Platform: ALL
Download: N/A
Links: see video below

Summary:
This a quick tutorial teaching you how to set-up AdMob on your game maker studio in order to add some ads to your game.
I'll teach you how to add banner, interstitial and rewarded video ads to your game, by using some objects to call those ads, and show you the final result in my own mobile.
It's a quick and easy implementation that could render some revenue for your game!

Hi, i imported your project into gms2, and i send it to android,but once i try to show the ads that are already loaded the application closes with this message:


Code:
W/Ads     (32707): Invoke Firebase method getInstance error.

W/Ads     (32707): The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date

I/yoyo    (32707): HttpProgress length mismatch length 4096 _len 9

W/Ads     (32707): Not retrying to fetch app settings
 
Hi, i imported your project into gms2, and i send it to android,but once i try to show the ads that are already loaded the application closes with this message:


Code:
W/Ads     (32707): Invoke Firebase method getInstance error.

W/Ads     (32707): The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date

I/yoyo    (32707): HttpProgress length mismatch length 4096 _len 9

W/Ads     (32707): Not retrying to fetch app settings
everyone that has this problem just change your game maker version!
 
T

TinyGamesLab

Guest
Hi, i imported your project into gms2, and i send it to android,but once i try to show the ads that are already loaded the application closes with this message:


Code:
W/Ads     (32707): Invoke Firebase method getInstance error.

W/Ads     (32707): The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date

I/yoyo    (32707): HttpProgress length mismatch length 4096 _len 9

W/Ads     (32707): Not retrying to fetch app settings
Try downloading the admob extension via the Add Ons section of the Main Game Options (dont forget to set your Minimum SDK API Level to 14 in the Android Game Options).

The firebase integration message is the same as in 1.4, but it works fine after receiving it.
 
Top