Type Function Return value none Revision Release 2025.3721 Keywords ads, advertising, AppLovin, setHasUserConsent, AppLovin Max See also applovinMax.init() applovinMax.load() applovinMax.isLoaded() applovinMax.setHasUserConsent() applovinMax.*
Used to mark user as age restricted for AppLovin SDK, which is important for Google Play’s child policies.
applovin.setIsAgeRestrictedUser( shouldAgeRestrictedUser )
Boolean. If the user is underage, please set the following flag to true, otherwise set it to false. The default value is 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 )