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.

AppGameKit Classic Chat / Setting up Admob in AGK

Author
Message
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 26th Apr 2014 18:24
Can anyone help with what the entire process is for getting the Admob Adverts correctly implemented in a Tier 1 AppGameKit game? I've never been able to create the APK files using Eclipse, etc. Someone posted around 100+ steps to use to compile the APK files and I've never been able to get that to work. Luckily, the link to create APK files (for dummies really) was provided and I'm able to create APK files, load them on to my phone, and play them myself.

However, I'd like to put an AD on there and get that to work and have been trying to figure out how to get Admob to work. I have an Admob account, got my app set up there so that's not the problem. What I need to understand is how to create the APK file with the Advert commands, etc. so that I can get this to work.

Does anyone have the ability to help me with this? Would be great if the guys making the AppGameKit software made this easy but that doesn't seem to be happening here. They have great software and provide an easy way to create games. But, it would be awesome if they helped make it easy to implement Adverts into our games so we could see if we can make some money doing this.

Any help is greatly appreciated. ...Bob
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 26th Apr 2014 19:39
I wrote a pretty comprehensive guide some time ago on integrating Admob (and optionally iAds etc.) into your app.

http://forum.thegamecreators.com/?m=forum_view&t=207370&b=41
bstebbs
11
Years of Service
User Offline
Joined: 10th Jan 2013
Location:
Posted: 27th Apr 2014 04:53
Hi xCept,

Thanks for that reply and I had seen that already. I tried going through it and was having some issues along the way but that's probably on my end, not the great writeup that you provided.

However, somehow, whatever I've done, it must be working now because my ads now show up. Here's what I've done:

1. Build my app and compiled in v1.0.8 (v2 doesn't seem to compile well so for now I'm sticking to v1.0.8).
2. Zipped my "media" folder.
3. Used the link that does the one-stop APK for you. I've tried the multi-step approach and that's never worked for me. This one is easy, it works, and it's straightforward. This link is:

https://developer.thegamecreators.com/android/create_apk.php

4. Setup my account on Admob. Also, before I compiled my app in Step 1, I put in the Advert commands in my app. Those commands are:

SetAdMobDetails("ca-app-pub-XXXXXXXXXX/YYYYYY") This is the ID for the app I want to put ads in that is provide on the Admob site.

//Create and Position the Advert
//2nd digit - 0=left, 1=center, 2=right
//3rd digit - 0=top, 1=center, 2=bottom
//4th digit - 1=test ad, 0=real
CreateAdvert(0, 0, 2, 1)
//Make Advert Visible
SetAdvertVisible ( 1 ) //0=hidden, 1=shown

5. I use www.dropbox.com to upload my APK file to my Dropbox and then when I access it on my phone, it automatically downloads it. And then, when the download completes, I click it and it automatically installs it.

And, as long as I keep the Package Name and Keystore File the same, then any time I upload a newer version of the software, it will do the update.

So, as long as this keeps working, then I think I might be ok.

Any comments let me know.

Login to post a reply

Server time is: 2024-11-25 04:33:48
Your offset time is: 2024-11-25 04:33:48