I have added full screen Ads in my application but when i click on the cross button on the full screen Ads to close the Ads page and simultaneously click on the Ads Page to open the test window it sometimes gives error message attempt to call method 'didRemoveListener' a nil value, i have added code what i am writing in my application below, Please help to sort out this problem, thanks...
local RevMob = require("revmob")
display.setStatusBar(display.HiddenStatusBar)
local fullscreen
local revmobListener
local storyboard = require "storyboard"
local REVMOB_IDS = {
["Android"] = "",
["iPhone OS"] = ""
}
RevMob.startSession(REVMOB_IDS)
RevMob.setTestingMode(RevMob.TEST_WITH_ADS)
local function ShowAds()
fullscreen.RevMob.createFullscreen()
RevMob.showFullscreen(revmobListener, REVMOB_IDS)
end
revmobListener=function(event)
if(event.type=="adClicked" then
fullscreen:hide()
storyboard.gotoScene("scenes.Scene1")
elseif event.type=="adClosed" then
fullscreen:hide()
storyboard.gotoScene("scenes.Scene1")
end
ShowAds()