类型 函数 返回值 无 修订 发行版 2024.3703 关键字 广告、展示广告、AppLovin、setHasUserConsent 另请参阅 applovin.init() applovin.load() applovin.isLoaded() applovin.setHasUserConsent() applovin.*
用于标记用户为 AppLovin SDK 的受年龄限制用户,这对 Google Play 的儿童政策很重要。
applovin.setIsAgeRestrictedUser( shouldAgeRestrictUser )
布尔值. 如果用户未成年,请将以下标志设置为 true
,否则将其设置为 false
。默认值为 false
。
local applovin = require( "plugin.applovin" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization -- Set age restriction applovin.setIsAgeRestrictedUser( true ) end end -- Initialize the AppLovin plugin applovin.init( adListener, { sdkKey="YOUR_SDK_KEY" } )