I want to integrate full screen RevMob Ad in and is able to add it but i some times get error that didRemoveListener nil value when i try it to click on ad to open it and close the add both at the same time.Please give any suggestions how to solve this issue.. thanks

local storyboard = require "storyboard"    
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
有帮助吗?

解决方案

You need two IDs placement_ids and revmob_id

The revmob_id is the App ID https://console.revmobmobileadnetwork.com/mobile_apps

The placement_id is the ad unit in the created apps in the revmob

Try click an app in your Apps tab, then scroll down until you'll the Ad Unit

There should be a Default there, click the Default then you will be redirected to a new page, there should be an ID there. That's your placement id for that ad.

You can also Add a placement if you want and use the placement id of your created placement.

local PLACEMENT_IDS = {[REVMOB_ID_ANDROID] = "Your app id here", [REVMOB_ID_IOS] = "Your app id here"}

local function revmobListener(event)
    print("Event: " .. event.type .. " - " .. event.ad)
    if event.type == "adReceived" then
    elseif event.type == "adNotReceived" then
    elseif event.type == "adClicked" then
        revMobBanner = RevMob.createBanner({listener = revmobListener }, PLACEMENT_IDS)
    end
end

local REVMOB_IDS = { ["Android"] = "Your placement id here", ["iPhone OS"] = "Your placement id here" }
RevMob.startSession(REVMOB_IDS)

revMobBanner = RevMob.createBanner({listener = revmobListener }, PLACEMENT_IDS)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top