Hallo Guys
I’m using admit for the first time and I do not know how to implement the code into my game.
The example from solar2D in the documentation wasn’t working.
I hope someone can help me.
My code:
build settings:
plugins =
{
[“plugin.admob”] =
{
publisherId = “com.coronalabs”
},
}
main lua:
local admob = require( “plugin.admob” )
local appID = “******”
local interstitialUnitID = “********”
– AdMob listener function
local function adListener( event )
if ( event.phase == "init" ) then -- Successful initialization
-- Load an AdMob interstitial ad
admob.load( "interstitial", { adUnitId="**********" } )
end
end
– Initialize the AdMob plugin
admob.init( adListener, { appId="************************" } )
– Sometime later, show the interstitial ad
if ( admob.isLoaded( “interstitial” ) ) then
admob.show( “interstitial” )
end
Thank you for every help!!!