Type Function Return value none Revision Release 2024.3703 Keywords ads, advertising, Appnext, setBackButtonCanClose See also appnext.getBackButtonCanClose() appnext.*
Android only; sets whether the “Back” key can close the ad false
by default)
appnext.setBackButtonCanClose( adKey, backButtonCanClose )
String. The ad key returned for a previously created ad.
Boolean. Indicates whether the “Back” key can close the ad.
local appnext = require( "plugin.appnext" ) local function adListener( event ) print( "Received " .. event.event .. " for " .. event.adKey .. " with message: " .. event.message ) end -- Initialize the Appnext plugin appnext.init( adListener ) -- Create your ads local interstitialPlacementID local platform = system.getInfo( "platformName" ) if ( platform == "iPhone OS" ) then interstitialPlacementID = "YOUR_IOS_INTERSTITIAL_PLACEMENT_ID" elseif ( platform == "Android" ) then interstitialPlacementID = "YOUR_ANDROID_INTERSTITIAL_PLACEMENT_ID" end local interstitialAdKey = appnext.createAd( "interstitial", interstitialPlacementID ) appnext.setBackButtonCanClose( interstitialAdKey, true )
© 2020-2024 Solar2D All Rights Reserved.
Help us help you! If you notice a problem with this page, please report it.