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
adSpace = native.showWebPopup(0, 432, 320, 48, “ad.html”, {baseUrl = system.ResourceDirectory, urlRequest = showAd})
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?
Thanks -
[import]uid: 9046 topic_id: 3632 reply_id: 303632[/import]