类型 函数 返回值 无 修订版本 版本 2024.3703 关键词 广告, 广告, AdMob, 隐藏 另请参阅 admob.getConsentFormStatus() admob.*
此函数显示要显示的同意表单(如果已加载)。
admob.showConsentForm()
local admob = require( "plugin.admob" )
-- Initialize the AdMob plugin
local function adListener( event )
if ( event.phase == "init" ) then -- Successful initialization
local formStatus, consentStatus = admob.getConsentFormStatus()
if(formStatus == "available")then -- recommend (not required)
admob.loadConsentForm()
end
end
if(event.phase == "loaded" and event.type == "ump")then
admob.showConsentForm()
end
end
admob.init( adListener, { appId="YOUR_ADMOB_APP_ID" } )