applovinMax.setIsAgeRestrictedUser()

类型 函数
返回值
版本 版本 2024.3703
关键词 广告、广告宣传、AppLovin、setHasUserConsent、AppLovin Max
另请参阅 applovinMax.init()
applovinMax.load()
applovinMax.isLoaded()
applovinMax.setHasUserConsent()
applovinMax.*

概述

用于标记 AppLovin SDK 的年龄受限用户,这对 Google Play 的子规则非常重要。

语法

applovin.setIsAgeRestrictedUser( shouldAgeRestrictedUser )
shouldAgeRestrictedUser (必需)

布尔值 如果用户未成年,请将以下标志设置为 true,否则设置为 false。默认值为 false

示例

local applovinMax = require( "plugin.applovinMax" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        -- Set age restriction
        applovinMax.setIsAgeRestrictedUser( true )
    end
end

-- Initialize the AppLovin plugin
applovinMax.init( adListener )