Hello, I create a game for Android and I use Applovin ads. Once the game starts, I want to show text like this “By agreeing, you confirm that you are over the age of 16 and would like a personalized ad experience”. Then I would like to set childDirectedTreatment to false, but I did not find an example for this. Is this the correct way
local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization -- Set user consent applovin.setHasUserConsent( true ) end end -- init applovin.init( adListener, { sdkKey=sdkKey, verboseLogging=false, testMode=true } )
Also, I want to ask in which case we should set childDirectedTreatment to false/true? I am not sure about this.
By the way, if I put applovin banner in main menu,
function scene:show( event ) if event.phase == "did" then applovin.show( "banner", {yAlign="top"} ) end end
Then, if “play button” button is pressed, I try to hide banner
applovin.hide( "banner")
and it gives me this error in simulator attempt to call field ‘hide’ (a nil value)
I can load and show interstitial ads in the same file.