I’m testing the webpopup on an iphone 3g. When an ad is clicked the webpopup displays fine, but when I hit the home button to close it, it closes the app also. I haven’t ran into this problem on android, only iphone. Any suggestions? I’m using xcode 3.2.6, could that cause it?
[lua]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
local adSpace = native.showWebPopup(0, 272, 320, 48, “ad.html”, {baseUrl = system.ResourceDirectory, hasBackground = false, urlRequest = showAd_Apple})[/lua] [import]uid: 48372 topic_id: 15341 reply_id: 315341[/import]
[import]uid: 52491 topic_id: 15341 reply_id: 56644[/import]