Got Admob working for Android :)

Hi there.
I’m trying for about 2 weeks to solve this issue of adding some Ads to an Android (HTC Sense).

But, I always receive a blinking Ad region flipping from left to right very quickly.

Any one got the same issue?

Regards [import]uid: 13114 topic_id: 8021 reply_id: 43173[/import]

If you use this code, or just want to help me out… please vote for my app here :stuck_out_tongue: 5 seconds literally!

NO NEED to register or anything long like that. Just click this link and then click on the heart to vote.

http://iheartthisapp.com/apps/walkabout/ [import]uid: 8872 topic_id: 8021 reply_id: 43532[/import]

I have implemented this solution and in the iOS simulator the webads just flash and dissapear and on the iOS devices it crasches the whole game. Any ideas why it will behave this way? [import]uid: 22737 topic_id: 8021 reply_id: 43897[/import]

Hi.
I kept a lot of time trying to figure why that solution does not work for me (and for others).
I made a lot of tests and here are the conclusions that can help others.

  1. Type of Ad.
    I created in the Admob site 4 types os Ads (Android, WebSmartPhones, WebMobile, iPhone) to see if the behavior changes depending on the type of device.
    In all my tests the results always are independent of type of Ad.
    I don’t know if there are other issues that Admob uses to check if the device is correct, mas the result was always the same.

  2. Type of Content Scaling.
    I discover that this was the key factor for it to work or not.
    Here are the results:
    letterBox : Ad trembles from left to right repeatedly (1 or 2 mm).
    zoomStretch : Ad trembles from left to right repeatedly (1 or 2 mm).
    none : Ad trembles from left to right repeatedly (half screen). very odd presentation.

The only way it works is with zoomEven.

I hope it helps.
Regards

[import]uid: 13114 topic_id: 8021 reply_id: 44106[/import]

Hi! Thank you for all your help with all your help so far but I am having a problem. I have everything working great however when I change the test from test: true to test: false and build for my device the adds are still showing as test ads…
Hopefully its something easy to fix… :confused: [import]uid: 10355 topic_id: 8021 reply_id: 44251[/import]

Hi,

I’m developing a free game and want to test the admob hack to put ads to it. Is there any way to test it before publishing the app in the market/appstore? The key point here is what url tell admob to get the code for the ads…

Thanks in advance and regards [import]uid: 68027 topic_id: 8021 reply_id: 44343[/import]

Som replies to the last few posts…

akviby: There was a bug in one of the dailies causing crashes with the web popup, try again with 319 or the latest

samad: I use letterbox and although the ad shuffles left to right when displayed it doesn’t continue to do that. The code is made for landscape orientation, but you can change the displayad function to reposition for portrait if thats what you’re using.

Evna: There are several files for different devices (all the ones ending in html). You need to turn test off in all of them. To turn test off, you should change ‘true’ to ‘false’

eusebi: Yes you can and SHOULD test before you publish. The url in admob isn’t actually used to verify your app for ads so you can leave it blank for now. Its used by admob to check your site/app if at some point they notice suspicious behaviour in your account - eg lots of ad clicks suddenly. Admob rules specify you are not allowed to put ads too close to buttons to trick people into clicking for example. [import]uid: 8872 topic_id: 8021 reply_id: 44491[/import]

Hi Kam,

In step 2 you say “…Edit the site and set the refresh rate to 20 seconds…”

I don’t see where in my admob dashboard I can set the refresh rate. I know I can do it there if the “site” is an app, but not if it’s a website, as far as I can tell. And this admob hack only works using the website admob site, correct?

Any clarification you can provide towards adjusting the ad refresh rate would be appreciated.

And thanks for updating all this info and code!

EDIT/UPDATE:
Never mind. Got it working. I was being dense and thought this was the same technique as the Ludicrous Software admob hack. I didn’t realize I can include the html files in my app package as opposed to running them off a web server.
Thanks again!

[import]uid: 9422 topic_id: 8021 reply_id: 44538[/import]

Hi, Kam…

First of all, thanks so much for your help.
Anyway, I use exactly the same code of post 1, and no ad is shown. But I see ad requests in my admob account… What can be happenning? (I am very new in these things, so sorry if the question has no sense…)

It is strange, because with the code of ludicroussoftware I do see ads, but none with yours…

Regards [import]uid: 68027 topic_id: 8021 reply_id: 44771[/import]

Sorry, forgot to mention that I’m working on Android 2.3.4…

Regards [import]uid: 68027 topic_id: 8021 reply_id: 44772[/import]

sorry, problem solved… It was me that have the test mode off and did’nt get any real ad… I suppose it is right, because I didn’t have tested it much long…
Anyway, I see that the test ad does not fit in the box and some of the borders can not be seen… What can I do to overcome this…
I’m working on a Samsung Galaxy S 2.3.4

Regards again
[import]uid: 68027 topic_id: 8021 reply_id: 44793[/import]

Hi,

Iv’e tested your hack, kam, and it works, but I’m not able to overcome some problems:

  1. the banner is always cropped. I use a config.lua file with 800x480 and landscape mode. Does the banner really have only 320x48 pixels? I always see the scroll bars on the sides of the banner…
  2. I have some doubts on where to put the banner… My intention was to locate it in the main game screen, but taking into account that banners in non-action screens work better, I’ve tried to put on screens after finishing a level, but there is a problem. I don’t know what happens, but as this screen is passed quickly, it is almost impossible to obtain a real ad from admob, I always have to wait 10-20-30 seconds to obtain an ad… May it be due to a slow network? I don’t think so… Maybe some of you can help me…

Best regards and thanks in advance

[import]uid: 68027 topic_id: 8021 reply_id: 45655[/import]

Kam187, been using your admob fix in my app for the last month. While it is working great technically…have you (or anyone else) noticed the lack of ad variety lately? It seems to serve up the same one or two ads (voice change and group texting) nearly 100% of the time. Seems like in the past there was dish, ebay, games, etc that were served up.

The only change I made recently was refreshing the ads every 20 seconds…I left that out originally by accident. I am assuming it is an admob problem…but just wanted to bounce it off the expert =)

[import]uid: 39506 topic_id: 8021 reply_id: 45844[/import]

I’am japanease android developer.?English little…

This web page is wonderful.
However, the error was found.
It is admob the error when returning clicking admob however.

–logcat??android

FATAL EXCEPTION: GLThread 11
E/AndroidRuntime( 4974): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=corona:http://c.admob.com/c1/
E/AndroidRuntime( 4974): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
E/AndroidRuntime( 4974): at

act=android.intent.action.VIEW dat=corona:http://c.admob.com/c1/
–Cause ? corona:
corona:http://c.admob.com/

string.gsub is not effective ?
–solved

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
local isCorona = string.sub(event.url, 1,7)
isCorona = string.lower ( isCorona )
if isCorona == “corona:” then
event.url = string.sub(event.url,8)
end

system.openURL(event.url)

[import]uid: 72883 topic_id: 8021 reply_id: 46582[/import]

I have problem in Android: it doesnt show any ads. I have everything set up, but it just doesnt work. But if i set test: true in html file, i can see test ad. But with test:false i cant see anything. Using latest daily build in Windows and Android 2.3.4 [import]uid: 18445 topic_id: 8021 reply_id: 47331[/import]

Got it working for Mobfox by just altering the code a bit (because the mobfox site ads are php-based I host the ad page on my own webserver and call it from there though)

even on the test ad, yeah sometimes appears straight away and sometimes can take quite a while to show, all on a wireless home network to rule out mobile data speeds as an issue

Either way, defeinitely nice having a 3rd option rather than either give your game away free with no monetisation or having to charge for it up front :slight_smile: [import]uid: 71799 topic_id: 8021 reply_id: 47422[/import]

Where does one edit the code to reposition the ad space? The size is fine, but I am using landscape and want it in the top left.

The code is great, by the way. I don’t see why Corona wouldn’t be able to implement this themselves soon. You made it simple enough.

Thanks a bunch!
-Cullen J Webb [import]uid: 52847 topic_id: 8021 reply_id: 47895[/import]

hi there,
just asking about the legal aspect?

Adsense closed several user accounts before because they made a html page with no content but ads in it (for example to include in a frame)

this solution here sounds similar. Any knowledge how admob stays to it?
For sure, i would be more than glad should the are cool with it :slight_smile:

chris
[import]uid: 4795 topic_id: 8021 reply_id: 53061[/import]

Not sure about admob, but I emailed mobfox who are very similar and they were fine with it and authorised mine, despite the fact it was again just a page with the ad on to be included as an overlay at the bottom of the game screen [import]uid: 71799 topic_id: 8021 reply_id: 53092[/import]

@alickgarnier
thanks for sharing your experience… could u also share a demo how you implemented mobfox.

would be great if some can confirm their experience with admob (legal) …

chris
[import]uid: 4795 topic_id: 8021 reply_id: 53101[/import]