applovinMax.setIsAgeRestrictedUser()

Type Function
Return value none
Revision Release 2024.3703
Keywords ads, advertising, AppLovin, setHasUserConsent, AppLovin Max
See also applovinMax.init()
applovinMax.load()
applovinMax.isLoaded()
applovinMax.setHasUserConsent()
applovinMax.*

Overview

Used to mark user as age restricted for AppLovin SDK, which is important for Google Play’s child policies.

Syntax

applovin.setIsAgeRestrictedUser( shouldAgeRestrictedUser )
shouldAgeRestrictedUser (required)

Boolean. If the user is underage, please set the following flag to true, otherwise set it to false. The default value is false.

Example

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 )