Got Admob working for Android :)
Replies
AddMob will never be included in any of my apps no matter what they pay!!!!
Have you seen the adds they push?
It is a reflection on you and your product what you advertise within, just say'n...
I delete any app that uses AddMob from my devices AND any other apps by the developer are avoided as well.
Just MY opinion.
Please make your own choice, just remember there will be consequences.
Not sure what you mean?
If you dont turn on age appropriate ads its not different to any other network I seen.
I agree with @Hotaman.
I was just looking at a coronaSDK built app the other day that runs AddMob ads. I'm not saying the app name because I don't think it's important.
I was shown an ad that said something like "Claim your free iPad2 Click & Win". When I clicked on it I was taken to this site.
You are asked to enter your mobile phone number and in the lighter smaller print you are told that a recurring charge of $9.99 will be charged to your mobile phone bill.
I believe these types of adds are scams that count on gullible people to enter without understanding what they are agreeing to. They probably make you jump through all kinds of hoops to cancel.
My reaction to seeing this was that I don't want these types of adds in any app that I release.
You might also consider the alternative to admob and inmobi I created here http://moonbeamdevelopment.com/?name=corona-lua-ad-network-leadbolt
Richard
I'll give it a shot :) Sent you a message via your contact form. Revenues and fill rates on android are terrible right now.
also inmobi is quiet bad now.
looks several adnetworks, look to get more advertisers by offering cheap CPC.
wish Corona would support MobFox, where I have much better experience.
cheers
chris
Hmm how much better is mobfox?
It looks doable - i could probably code something up for it if you really think its worth it?
from experience on Native Android app nearly 3 !! Times InMobi .
Was my post removed?
Nevermind - just found it again..
What sort of requests/impressions/fillrate and click rate are we talking about?
If its over very few requests 3 times doesnt mean that much :)
its compared with a daily 100.000 requests over one week.
fillrate i don't see in mobfox.
mobfox ctr 2.17% to inmobi 1.19%
Hmmm now thats interesting. I'll take a look at it and see if I can code something up.
sounds good.
just make sure its confirm with their terms.
best get an confirmation by email and telling exactly what you like to do.
than i open to implement your solution also.
i just like to avoid any problem by implementing a hack that finally could lead
to account termination at mob fox :)
We tried MoxFox at the beginning of this year but ultimately left them for three major reasons.
1) LOW fill rates
2) They are just a medium to pass ads out to you from other ad networks - in which they take yet another cut of what you would be earning.
3) You have to wait NET 90 on some of the ad networks because again, the ad networks pay Mobfox, then they pay you.
It wasn't an ideal solution for us so we actually use several different choice ad networks and mediate them ourselves using a custom written ad database we control. That way when one ad network is tanking, we can switch over to another and try them. It's sort of like day trading :)
Rich
i see that mob fox changed a lot in the last months.
from low filtrate..i get now around 90%
about medium for other networks... i don't know.
but i know other networks like inmobi.. get ads from Mobfox :)
anyhow what would you advice.
Right now.. ONLY Inmobi is at all the worst case.
we can't choose at all :(
LeadBolt leads the way :)
We also use Admob, Pontiflex, and airpush on occasion but we keep push notifications off most of the time because of the hate-mail you'll get :P
I've got the lua wrapper and all information available on our website here http://moonbeamdevelopment.com/?name=corona-lua-ad-network-leadbolt
Alot more ad network info in my book also here, http://moonbeamdevelopment.com/?name=Making-Money-With-Android-Book
It's based on Android side but it's very relevant to iOS as well..
Rich
Anyone know if web-popups with admob works in the simulator with the new Native UI on mac?
I've just tried to implement Admob to my Android app:
http://market.android.com/details?id=com.gyulabozzai.rotatepuzzle
In test mode, i can successfully view a test ad on my phone.
But then, when i disable test mode no ads can be displayed.
However, logging into Admob, in the site & apps page, next to my app, the request keep increasing (more than 10000). So I think i have implement the ads properly, but don't know why i can't see them.
Another point is, the eCPM and fill rate is always 0.
Corona: 645 Daily Build
Help me, please! Thanks!
If I'm not mistaken, I think this AdMob hack is not working anymore now that Google has moved all web-based ads to AdSense. From my understanding, AdMob ads must now be served via the AdMob SDK. I have stopped using the AdMob hack as I do not want to risk getting my AdMob account terminated by Google. And from what I hear, Google is very quick to terminate accounts. And having 10000 or more requests per day with zero fill rate, might trigger the alarm bells with the AdMob team. The best thing we can do, in my opinion is to petition Ansca to provide official support for AdMob in the Corona SDK. I wonder what is taking Ansca sooooo looong. Sigh.
It does still work. If you look carefully at the post from admob it says that ads served through the .js to iPhone and android are still active for now.
However, the fill rate is still pretty bad in some countries, so its hard to test if you're in one of those countries!
@kam187 i have made everything that you said but nothing happens
I m using Daily Build CoronaSDK-2011.689
By the way sorry my lazy brain
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | -- SOME INITIAL SETTINGS display.setStatusBar( display.HiddenStatusBar ) --Hide status bar from the beginning system.setIdleTimer( false ) -- turn off device sleeping -- Admob Start Here local adSpace local isAndroid = "Android" == system.getInfo("platformName") function showAd_Android(event) -- Is the url a remote call? if string.find(event.url, "android_ad.html", 1, false) or string.find(event.url, "android_ad15.html", 1, false) then return true else system.openURL(string.gsub (event.url, "Corona:", "")) -- Refresh ad RemoveAd(0) DisplayAd(0) return true end end local function showAd_Apple(event) -- Is the url a remote call? if string.find(event.url, "http://", 1, false) == 1 then -- Is it a call to the admob server? if string.find(event.url, "c.admob.com", 1, false) == nil then adSpace.url = event.url else -- an actual click on an ad, so open in Safari system.openURL(event.url) -- Refresh ad RemoveAd(0) DisplayAd(0) end else -- Feb 1, 2011: if using the old version of this code, remove the -- following line: -- adSpace.url = event.url -- and put in this line instead: return true end end function DisplayAd(t) native.cancelWebPopup() timer.performWithDelay(t, function() local adfile = "apple_ad.html" local sizeX = 320 local sizeY = 48 local scale = 1/display.contentScaleY if isAndroid then if scale > 1.5 then adfile = "android_ad15.html" sizeX = sizeX*(1.5/scale) + 1 sizeY = sizeY*(1.5/scale) + 1 else adfile = "android_ad.html" end adSpace = native.showWebPopup((display.contentWidth - sizeX)/2, display.contentHeight - display.screenOriginY - sizeY, sizeX, sizeY, adfile, {baseUrl = system.ResourceDirectory, hasBackground = false, urlRequest = showAd_Android}) elseif system.getInfo( "environment" ) == "simulator" then adSpace = display.newRect( (display.contentWidth - sizeX)/2, display.contentHeight - display.screenOriginY - sizeY, sizeX, sizeY ) display.getCurrentStage():insert(adSpace, false) else if scale > 1.5 then sizeX = sizeX*(1.5/scale) + 1 sizeY = sizeY*(1.5/scale) + 1 end adSpace = native.showWebPopup((display.contentWidth - sizeX)/2, display.contentHeight - display.screenOriginY - sizeY, sizeX, sizeY, adfile, {baseUrl = system.ResourceDirectory, hasBackground = false, urlRequest = showAd_Apple}) end end ) end function RemoveAd(t) timer.performWithDelay(t, native.cancelWebPopup) timer.performWithDelay(t, function() adSpace:removeSelf() end) end -- Admob Break Here ------------------------------------------------------------------------- -- Game Code Start Here ------------------------------------------------------------------------- local itunesID = nil --> set this if you want users to be able to rate your app -- Import director class local director = require("director") -- Create a main group local mainGroup = display.newGroup() -- Main function local function main() -- Add the group from director class mainGroup:insert(director.directorView) -- Initial openfeint calls (to initialize openfeint) --openfeint = require ("openfeint") --openfeint.init( "---", "---", "Your Game Name", "---" ) --*************************************************** -- saveValue() --> used for saving high score, etc. --*************************************************** local saveValue = function( strFilename, strValue ) -- will save specified value to specified file local theFile = strFilename local theValue = strValue local path = system.pathForFile( theFile, system.DocumentsDirectory ) -- io.open opens a file at path. returns nil if no file found local file = io.open( path, "w+" ) if file then -- write game score to the text file file:write( theValue ) io.close( file ) end end --*************************************************** -- loadValue() --> load saved value from file (returns loaded value as string) --*************************************************** local loadValue = function( strFilename ) -- will load specified file, or create new file if it doesn't exist local theFile = strFilename local path = system.pathForFile( theFile, system.DocumentsDirectory ) -- io.open opens a file at path. returns nil if no file found local file = io.open( path, "r" ) if file then -- read all contents of file into a string local contents = file:read( "*a" ) io.close( file ) return contents else -- create file b/c it doesn't exist yet file = io.open( path, "w" ) file:write( "0" ) io.close( file ) return "0" end end --*************************************************** -- startGame() --> self-explanatory --*************************************************** local startGame = function() -- ask to rate the game if it's the 4th time opening the app local ratingData = loadValue( "rating.data" ) if ratingData == "0" then --> file didn't exist yet, first time opening saveValue( "rating.data", "1" ) elseif ratingData == "1" then --> 2nd time opening saveValue( "rating.data", "2" ) elseif ratingData == "2" then --> 3rd time opening saveValue( "rating.data", "3" ) elseif ratingData == "3" then --> 4th time opening; show the popup asking to rate, dismiss, or don't show again local onRatingComplete = function( event ) if "clicked" == event.action then local i = event.index if 3 == i then -- Do nothing from user's perspective, make sure it doesn't show again saveValue( "rating.data", "10" ) elseif 2 == i then -- Do nothing; dialog will simply dismiss saveValue( "rating.data", "0" ) -- reset back to 0 elseif 1 == i then -- First, make sure dialog won't show anymore and then open app store link saveValue( "rating.data", "10" ) local itmsURL = "https://market.android.com/details?id=com.game.lab" .. itunesID system.openURL( itmsURL ) end end end -- Show alert with five buttons local ratingAlert = native.showAlert( "Will You Submit a Rating?", "", { "Rate This Game", "Remind Me Later", "No, Thanks" }, onRatingComplete ) end director:changeScene( "maingame" ) end -- Start the game off with an optimization test startGame() return true end -- Begin main() <blockcode> <code> This is my -- build.settings see settings = { orientation = { default = "landscapeRight", supported = { "landscapeRight" }, }, android = { versionCode = "3", versionName = "1.2" }, androidPermissions = { "android.permission.INTERNET", "android.permission.ACCESS_NETWORK_STATE" }, } |
First things first, turn on test mode, and see if you see the placeholder 'ad'. If not, there's a problem with your code or permissions.
No place holder - Its strange by default Corona allow internet connection. You have a sample production code to show ?
So is this guide still working? Inmobi is a pain, i've a 25% fill rate.
please !! ad a new adnetwork... additional to inmobi !!!
hi.. I've used this code and it works fine in "HCL Me tablet" but the same code is not working in Samsung Galaxy Tab 10.1 . It displays the add space but no Ad is coming... pls Help..
The admob script only serves ads to devices who's UA string contains 'Android 1' or 'Android 2'. So if you're device is HoneyComb (android 3), OR has a desktop UA then ads won't display.
You can get around it by faking the UA sent to their script. Find this line in the ad.html files (both of the android ones):
1 | <script type="text/javascript" src="http://mmv.admob.com/static/iphone/iadmob.js"> |
Then add this block DIRECTLY above it.
1 2 3 4 5 6 7 8 9 10 11 | <script type="text/javascript"> var userAgentTemp = navigator.userAgent; if (!(RegExp("Android (1|2).").test(userAgentTemp))) { navigator = {} if (userAgentTemp.search(/Android/) != -1) { navigator.userAgent = userAgentTemp.replace(/Android 3[\.\d]*/, "Android 2.3.3"); } else { navigator.userAgent = userAgentTemp + "; Android 2.3.3"; }; }; </script> |
Currently ICS (Android 4) doesn't work properly, so its best not to check for Android 4. right now. I'll update when i find a fix.
BTW, this hack is still working perfectly. Still making $10 to $15 a day with it. I'm looking into house ads now.
Admob don't actually have a facility to display house ads if no paid ones are available, but it should be possible through javascript by checking if an ad displayed, and if not then request a house ad.
I'm thinking we could then swap banners between us and advertise each others games when the fill rate is crap!
@kam187
You mentioned you get around $10-$15 per day. Across how many apps?
Just Walkabout. It makes about 8 to 10$ on iOS, and about 1 to 6 on Android. Fill rates are around 60% on iOS and 40% on android. When they were better (80% +) I would see 10 to 15$ on iOS and 5 to 10$ on android. On average $20 a day.
Thanks for the info!
None of the native Corona Ad Networks have me convinced yet. I've had good results with AdMob in other apps, so I might just try this out in one of my next Corona apps.
I guess that this implementation is a little bit in a "grey area" in AdMob's eyes, though.
Correct me if I'm wrong, but shouldn't I be able to open android_ad.html in my device's mobile browser and see some ads?
I've entered my publisher ID. Running on Android 2.2.2
EDIT:
I've also set test to true.
Ok this trick works but i've encountered a great poblem a week ago: my app id was blocked by Admob so my app stopped to get response and ads. Is it normal? Anyone else got my problem?
Blocked, eh? Yeah, that's what I was afraid of.
This implementation does seem to be in a "grey area", and I don't think Admob would endorse it.
I was planning to experiment with this in my next app, but this news has made me think that it's maybe just not worth it...
Here there is my report from admob (exported to .csv), and as you can see admob stopped to send me response on 22/Dec
1 2 3 4 5 6 7 8 9 10 11 12 | Report Type,Sites & Apps Reporting Start Date,2011/12/18 End Date,2011/12/24 date,revenue,ecpm,requests,cpc_impressions,fill_rate,clicks,ctr 2011/12/24,0,0,246329,0,0,0,0 2011/12/23,0,0,235137,0,0,0,0 2011/12/22,0.084,0.0248,205889,3383,0.0164,4,0.0012 2011/12/21,3.2059,0.028,200840,114644,0.5708,97,0.0008 2011/12/20,3.4901,0.0432,172951,80769,0.467,93,0.0012 2011/12/19,2.658,0.0271,158735,98027,0.6176,79,0.0008 2011/12/18,7.6749,0.1134,167925,67703,0.4032,86,0.0013 |
I switched to inner-active for high-end devices and a banner image to my market account for low-end ones.
But i would prefer to switch back to admob if possible.
Wierd no issues here.. I'm still being served ads for both iOS and android. In fact revenue seems to have gone up a little.
@swipeware - It depends.. it may throw some security error because you're loading a remote script but using a local page. Just test build in corona and open it in a webpopup and see what happens.
On a side note.. Walkabout has just been added to GetJar gold. You can now download the full version for free, and they pay me for every download :)
So please, if you have a few minutes go and download it. No registration needed, and there's a few hundred other paid apps for free on their site - with some big names too.
Just browse here on your android device :)
Done :)
I'm the first who download your game from getjar, the game is very nice imo.
Coming back to admob issue, how many request/impression dou you have at day Kam? i was blocked the day after i reached 100k.
Hmm, I just checked and I have 40k requests a day and about 25k impressions a day.
If your impressions are very high or jump, they usually go and check your app. Whats your click through rate? Are you 'tricking' people into clicking by putting ads near a button?
@ shark.androidlab
I think that they look more closely at the number of requests that you have.
I just had a look at your statistics that you posted in reply #136.
You have over 200k requests? WHOA! That's a lot of requests! Over how many apps?
I also see that your CTR is extremely low (0.08%). From that alone it looks like you're changing ads every few seconds. Have your changed the default refresh-rate of 30 seconds to something very low?
I only have one app using AdMob (It's developed with Xcode, and I'm using the official AdMob SDK).
Per day, I have on average 8k requests, 99% fill-rate and a CTR of 1% (30s refresh rate).
With that I have a revenue of around $3/day.
fyi my CTR is between 1 and 1.5% usually.
@kam187
Yeah, from my experience that's what I would consider a normal CTR.
I think that's why @shark.androidlab got blocked. Way too many requests/impressions with very few actual clicks.
Dears,
I also have Admob running on my apps and it is working fine.
However I tried to set a house ad campaign to cross promote my own apps and it didn't work.
I wonder if house ads campaigns do not work for Corona apps as they don't go through the regular Admob adherence process that requires the Admob api.
Has anyone tried to set a house ad campaign for your aps? Is there any trick to make it work?
ps.: I would be interest to cross promote other publishers apps. I currently generate 2MM ad requests/ day on android.
Thanks for any help you guys can provide.
Best!
@luis.zlochevsky
Contact me offline for some cross-promotion help. We have our own network we've used for the past couple of years and are interested in opening it up to the public. It proves quite effective..
Best,
Richard
Richard, thanks for replying. What's your e-mail and Skype address? Best!
Contact me offline at http://moonbeamdevelopment.com/?name=Contact and we can get going.
Richard
Hey, I just coded an ad mediation module which supports admob, inneractive, inmobi, herewead and house ads. My admob implementation mimics latest admob sdks http requests instead of using some hacky web html ad container. So you will get the best fillrate possible from admob.
Please check it out
Ad Mediator for Corona:
http://developer.anscamobile.com/code/ad-mediator-corona
Documentation:
https://github.com/deniza/Ad-Mediator-for-Corona/wiki/Documentation
deniz, you beat me to it!
I STRONGLY recommend everyone switch to deniz's module. The only reason not to, is for your old 319 builds. The fill rates with this html hack are all over the place.
This looks VERY promising!
Thanks for the share.
Once I have some spare time I'll be attempting to create a Mobclix plugin (if nobody beats me to it).
LunarAds (http://lunarads.com) is a server based ad model that currently supports admob, leadbolt, leadbolt app walls, and tapit ads. This week we are adding Pontiflex ads and a couple other ad new networks as well.
Our model is "One SDK to Rule them all" and is tailored to Corona users. Our belief is simple, why use multiple ad network SDK's in your app source code and have to do imminent app updates to support newer network SDK's? Just use one (LunarAds) and support all of them in one bang!
Using Lunar Ads
Using our system is a snap. Simply login at http://LunarAds.com, create a new app channel, specify which ads networks you want that app to run (including your own in-house ads), then put the Lunar.lua file in your project folder and call it from any Corona page with a simple require statement. You can adjust which ad networks you want to use at anytime, and our list is growing rapidly - by the end of February we will have over 8 ad networks to choose from!
Reporting
LunarAds also keeps track of the following analytics for you for each app channel you create as well;
Deviceid
Screen width
Screen height
OS build
Lunar channel
Device IP
App Version
With our reporting engine, you can instantly grab valuable information about how your app is being used.
Google Analytics
Want more? How about using Google analytics tracking inside your app as well?
No problem, just select your channel to use Google tracking code and specify the code channel provided by Google, and you can instantly send tracking stats to Google servers and watch real time data.











Just loaded Walkabout Lite, and no ads showing.