类型 函数 返回值 布尔值 修订版本 发行版 2024.3703 关键字 广告、投放广告、Appnext、getShowClose 另请参阅 appnext.setShowClose() appnext.*
仅适用于全屏及奖励广告。获取“关闭”按钮显示或隐藏的设置。
appnext.getShowClose( adKey )
字符串. 针对先前创建的广告返回的广告密钥。
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 fullscreenPlacementID local platform = system.getInfo( "platformName" ) if ( platform == "iPhone OS" ) then fullscreenPlacementID = "YOUR_IOS_FULLSCREEN_PLACEMENT_ID" elseif ( platform == "Android" ) then fullscreenPlacementID = "YOUR_ANDROID_FULLSCREEN_PLACEMENT_ID" end local fullscreenAdKey = appnext.createAd( "fullscreen", fullscreenPlacementID ) appnext.setShowClose( fullscreenAdKey, true ) if ( appnext.getShowClose( fullscreenAdKey ) ) then print( "Close button is shown" ) else print( "Close button is hidden" ) end