I just tried using RevMob plugin, but I keep getting this warning and no ads is visible on my simulator. I referred the documentation exactly and still I’m facing this issue. Can someone please tell me what might be the problem.
Thanks Rob !! U are right the plugin doesn’t work on simulator but it does on device.
I tried using all typed of ads but I could load only Banner. However, video and interstitial ads don’t get loaded.
This is my banner code
placementIDB = "57070a7c6f46b5110b1421a9" function adListenerB( event ) if ( event.phase == "init" ) then -- Successful initialization -- Load a RevMob ad revmob.load( "banner", placementIDB ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded -- Show the ad revmob.show( placementIDB, { yAlign="top" } ) end end revmob.init( adListenerB, { appId="57070a7c6f46b5110b1421a7" } )
This is my Video / Interstitial Code
placementIDV = "57070a7c6f46b5110b1421b1" function adListenerV( event ) if ( event.phase == "init" ) then -- Successful initialization -- Load a RevMob ad revmob.load( "interstitial", placementIDV ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded -- Show the ad revmob.show( placementIDV, { yAlign="center" } ) end end revmob.init( adListenerV, { appId="57070a7c6f46b5110b1421a7" } )
This is the code I use to remove banner loaded in previous screeen
Given the code snippet you posted above, you won’t see the error, as you’re only listening for two events.
Try this:
function adListenerV( event ) for k, v in pairs(event) do print(k, ":", v) end end revmob.init( adListenerV, { appId="57070a7c6f46b5110b1421a7" } )
It’s always the same. I tried some variations and noticed the following error in the console now: “ERROR: THE APP is depending on legacy on-demand authorization, which is not supported for new apps”
The vungle stuff is not used in the code. I also included the necessary Android settings, but because I’m testing for iOS I’ve not shown it in the code above.
Here is the last code test I did:
local revmob = require( “plugin.revmob” ) adListener = function( event ) if ( event.phase == “init” ) then – Successful initialization – Load a RevMob ad revmob.load( “banner”, “PLACEMENT ID HERE”) – Banner Placement ID – revmob.load( “video”, “PLACEMENT ID HERE”) – Video Placement ID – revmob.load( “interstitial”, “PLACEMENT ID HERE”) – Fullscreen Ad Placement ID elseif ( event.phase == “loaded” ) then – The ad was successfully loaded print( "event.type= "…event.type ) revmob.show( “PLACEMENT ID HERE”, { yAlign=“top” } ) elseif ( event.phase == “failed” ) then – The ad failed to load print( "event.type= "…event.type ) print( event.isError ) print( event.response ) end end revmob.init( adListener, { appId=“APP ID HERE” } ) revmob.show( “PLACEMENT ID HERE”, { yAlign=“top” } ) locationHandler=function(event) – Check for error (user may have turned off Location Services) if event.errorCode then print( "Location error: " … tostring( event.errorMessage ) ) else revmob.setUserLocationLatitude(event.latitude) revmob.setUserLocationLongitude(event.longitude) revmob.setUserLocationAccuracy(event.accuracy) end Runtime:removeEventListener( “location”, locationHandler ) end onSystemEvent=function( event ) if ( event.type == “applicationResume” ) then – Start a new RevMob session revmob.startSession() end end Runtime:addEventListener( “system”, onSystemEvent ) Runtime:addEventListener( “location”, locationHandler )