I’m trying to get a working URL listener for native.webpopup to work on Android. For whatever reason the URL isn’t being passed back correctly into the (now famous) admob work-around.
Those needing a refresh, here is the admob code that is supposed to work as posted on the ludicroussoftware website;
local function showAd(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)
end
else
–system.openURL(event.url)
adSpace.url = event.url
end
end
On Android, (with the new webpopup fix for game edition) the ad DOES show in the small webview but the problem is when a click is initiate to open the ad, it opens it in the SAME 48px high webpopup thus rendering the ad useless to see -
Does anyone got some insight as to what I can do to make either a new webpopup appear with the full page ad in it, or maybe using the directors class?
I’m am having the exact same problem and was just about to ask for help as well.
If anyone from Ansca has an answer, it would be a huge help. Being unable to use ads is a big deal, particular on Android.
I’ve thought about using native.showWebPopup instead of system.openURL(event.url) to open the ad once clicked on, but that would just leave the app buried behind a WebPopup that can’t be easily dismissed. Ideally, it should suspend the app and switch to the native browser, as happen on the iPhone. [import]uid: 1560 topic_id: 3632 reply_id: 11045[/import]
No luck. I tried canceling the Web pop-up window before calling the URL but it still opened in a pop-up size window rather than the whole screen. [import]uid: 1560 topic_id: 3632 reply_id: 11119[/import]
Web popups now open to the right size in Android but the AdMob hack does not seem to work – the ads don’t load in the Web popup window. [import]uid: 1560 topic_id: 3632 reply_id: 15259[/import]