[UPDATED] tutorial: Attaching Admob to RenPy

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
bigdeal
Newbie
Posts: 2
Joined: Sat Apr 13, 2019 1:44 pm
Deviantart: bigdeal76
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#31 Post by bigdeal »

Hey there ! Could you please tell me how to set build.google_play_key in renpy no one is helping me I want to upload my game on google play store but I can not set the key becuase I do not know where to add it and great work 👍

Pedrov
Newbie
Posts: 2
Joined: Thu Apr 25, 2019 3:32 am
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#32 Post by Pedrov »

bigdeal wrote: Sun Apr 14, 2019 7:49 am Hey there ! Could you please tell me how to set build.google_play_key in renpy no one is helping me I want to upload my game on google play store but I can not set the key becuase I do not know where to add it and great work 👍
Hey man did you get ads in your game? If u did can u help? Thanks

User avatar
Andredron
Miko-Class Veteran
Posts: 688
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#33 Post by Andredron »

Information for those who monetize the game through the display of advertising AdMob.

From January 23, 2018, support for AdMob SDK versions lower than 7.0.0 is terminated. In other words, your advertisement will NOT work if you have connected it with this well-known instruction.

Details written here:
https://support.google.com/admob/answer ... ?ctx=email

Advertising will continue to work, but you only need to update Android Studio to the latest version and change one line of code.

In clause 4.1 of this manual, here is this line:
compile 'com.google.android.gms: play-services: 6. +'

Change to this one:
compile 'com.google.android.gms: play-services-ads: 17.2.0'

This line instead of the outdated 6th version of Google services, connect the component of the latest version of advertising.
This is all, the rest is also done according to the instructions given.

User avatar
ComputerArt.Club
Veteran
Posts: 427
Joined: Mon May 22, 2017 8:12 am
Completed: Famous Fables, BoPoMoFo: Learn Chinese, Santa's workshop, Cat's Bath, Computer Art Club
Location: Taiwan
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#34 Post by ComputerArt.Club »

Andredron wrote: Fri Apr 26, 2019 9:45 am Information for those who monetize the game through the display of advertising AdMob.

From January 23, 2018, support for AdMob SDK versions lower than 7.0.0 is terminated. In other words, your advertisement will NOT work if you have connected it with this well-known instruction.

Details written here:
https://support.google.com/admob/answer ... ?ctx=email

Advertising will continue to work, but you only need to update Android Studio to the latest version and change one line of code.

In clause 4.1 of this manual, here is this line:
compile 'com.google.android.gms: play-services: 6. +'

Change to this one:
compile 'com.google.android.gms: play-services-ads: 17.2.0'

This line instead of the outdated 6th version of Google services, connect the component of the latest version of advertising.
This is all, the rest is also done according to the instructions given.
I don't yet use AdMob, but I really appreciate your efforts! Thank you again for all your help. You are awesome!

Pedrov
Newbie
Posts: 2
Joined: Thu Apr 25, 2019 3:32 am
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#35 Post by Pedrov »

Andredron wrote: Fri Apr 26, 2019 9:45 am Information for those who monetize the game through the display of advertising AdMob.

From January 23, 2018, support for AdMob SDK versions lower than 7.0.0 is terminated. In other words, your advertisement will NOT work if you have connected it with this well-known instruction.

Details written here:
https://support.google.com/admob/answer ... ?ctx=email

Advertising will continue to work, but you only need to update Android Studio to the latest version and change one line of code.

In clause 4.1 of this manual, here is this line:
compile 'com.google.android.gms: play-services: 6. +'

Change to this one:
compile 'com.google.android.gms: play-services-ads: 17.2.0'

This line instead of the outdated 6th version of Google services, connect the component of the latest version of advertising.
This is all, the rest is also done according to the instructions given.
I will try this, thanks a lot!

i_jemin
Regular
Posts: 80
Joined: Sat Apr 11, 2015 3:14 pm
Github: i_jemin
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#36 Post by i_jemin »

it's been 4 years but even now, I still get so many messages that how to add admob in recent version.
SO I made video

https://youtu.be/oUhcXlzc2a4

User avatar
Bertran
Regular
Posts: 33
Joined: Tue May 02, 2017 12:58 pm
Projects: Run, Kitty!
Deviantart: bertranway
Skype: bertranway
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#37 Post by Bertran »

Please, help me.

I stucked with

android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

The problem - I can't find that long app ID in AdMob UI at all!
It should be for apps which in Google Play, but I just have only APK from RenPy.

If I go in settings, I find that -

Publisher ID

pub-1479238597726566

AdSense client id

953-431-7740

Google ad ID

571-139-8905

What to do... I don't understand, augh... so difficult T_T

Thank you

prestristan
Regular
Posts: 25
Joined: Sat Apr 11, 2020 1:28 pm
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#38 Post by prestristan »

Bertran wrote: Thu Feb 20, 2020 2:21 pm Please, help me.

I stucked with

android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

The problem - I can't find that long app ID in AdMob UI at all!
It should be for apps which in Google Play, but I just have only APK from RenPy.

If I go in settings, I find that -

Publisher ID

pub-1479238597726566

AdSense client id

953-431-7740

Google ad ID

571-139-8905

What to do... I don't understand, augh... so difficult T_T

Thank you
You'll get that long code after you added an app inside AdMob
(Login to Admob > Go to "Apps" > "Add app") *Don't worry dude if you still doesn't have your app on the Play store /appstore just go with the process of adding an app you can link them later.
then inside your app id there will be an option on creating an "Ad unit" which where you can get the "ad unit id"

The difference of the two is just the symbol (~ and /):
app id looks like : ca-app-pub-xxxxxxxxxxx~xxxxxxxxxxxx
ad unit id looks like: ca-app-pub-xxxxxxxxxxx/xxxxxxxxxxxx

prestristan
Regular
Posts: 25
Joined: Sat Apr 11, 2020 1:28 pm
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#39 Post by prestristan »

Sorry for double posting.

I just would like to know how to use Interstitial ads instead of banner type ads.
I checked these with some of my testers and the ad works fine no problem but their only complain is that banner type ads are wayyyyy annoying to the players (in their opinion).

Since the admob banner will not go away. It will be there all throughout your gameplay, no close buttons, no skip ad option.

Now Interstitial ads on the other hand takes the whole screen but it comes with a skip ad / close ad option.


Edit: nvm guys thanks , I got the Interstitial ads to work. It's the same process just a different call.

User avatar
AoiUsui
Regular
Posts: 42
Joined: Mon Nov 26, 2012 11:21 am
Completed: Alice's Dolls
Projects: Alice's Dolls, Tappy Virus
Organization: Otaku Brigade
itch: otakubrigade
Location: Philippines
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#40 Post by AoiUsui »

Hi,
It seems we can't open the game in Android after following the YouTube video. We don't know how to fix this.

Looking forward for any help.

prestristan
Regular
Posts: 25
Joined: Sat Apr 11, 2020 1:28 pm
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#41 Post by prestristan »

AoiUsui wrote: Mon May 11, 2020 6:54 am Hi,
It seems we can't open the game in Android after following the YouTube video. We don't know how to fix this.

Looking forward for any help.
The video retr0 posted is for Renpy 7.3.3 check if the APK you've created is from 7.3.3

User avatar
FoGame
Newbie
Posts: 10
Joined: Mon Jul 06, 2020 5:34 pm
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#42 Post by FoGame »

Hi guys! I need your help. I do not understand Java at all, so I'm sorry if the questions are stupid, but I made the game and it only remains to implement advertising. Normal advertising as in this guide is not a problem, but it does not suit me because it can not be closed.

1. How do I embed "Interstitial" ads? According to the official guide https://developers.google.com/admob/and ... tial?hl=ru nothing happened.
2. I need to make the ad appear once every 4 minutes, I have an idea to do it through a timer in (Java) good examples of them on the Internet are enough. But again, the question arises, how do I make the first ad appear 4 minutes after starting the game, and then appear after it (advertising) closes every 4 minutes?
Thank you in advance to all who will help!)

hbhibiki
Newbie
Posts: 1
Joined: Wed Aug 12, 2020 4:55 am
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#43 Post by hbhibiki »

I have followed every single steps of yours and I still cannot get the banner ad, so what is causing this bug and I have no idea, would it be possible for you guys to help me ?

My androidmanifest.xml(from app folder):
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~3347511713" />

My androidmanifest.xml(from renpyandroid folder):
<uses-permission android:name="android.permission.INTERNET"/>

And I add those 7 lines to the onCreate() of SDLActivity.java

It would be nice if someone can help me out and I am using the latest renpy on mac

User avatar
BáiYù
Regular
Posts: 131
Joined: Fri Apr 01, 2016 10:02 am
Completed: This Life Escapes Me, Up All Night, Lotus: The Self-Made Witch
Projects: Various
Organization: tofurocks, Fiendish Fiction, Spider Lily Studios
Github: baiyu-dev
itch: tofurocks
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#44 Post by BáiYù »

So I followed the steps as best I could, but due to the recent update to API Level 29, the current tutorial posted in 2019 is no longer functional. Gradle will complain about several issues that can't be fixed by rolling back to a previous version of itself.

I'm curious to know if anyone has a workaround or knows how to get Gradle to cooperate with Android 10. As much as I'd like to put more time into researching this, Android Studio isn't my field of expertise.
Image
Games and supplementary Ren'Py codes

User avatar
Morhighan
Miko-Class Veteran
Posts: 975
Joined: Sun Jun 27, 2010 12:54 pm
Completed: AIdol, When Our Journey Ends, Forgotten Not Lost
Organization: MysteryCorgi
Tumblr: MysteryCorgi
Deviantart: MysteryCorgi
Soundcloud: MysteryCorgi
itch: MysteryCorgi
Location: USA
Contact:

Re: [UPDATED] tutorial: Attaching Admob to RenPy

#45 Post by Morhighan »

Keeping an eye on this for the future, thanks for your hard work.

Post Reply

Who is online

Users browsing this forum: No registered users