Applovin banner and how to set childDirectedTreatment

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.

  1. Dialog - If you want to show a dialog with a question use: 

https://docs.coronalabs.com/api/library/native/showAlert.html

For example, in my ‘Bird Climb - Skinning & Modding Template’ I have an option to show this dialog:

gdp_dialog.png

2.  childDirectedTreatment  - If your app is COPPA compliant you set it to ‘true’

**UPDATE** Does not apply.  OP was asking about AppLovin which does not support a COPPA setting.

3.  Ads in Simulator  - You cannot (by default) test Ads in the simulator.  Only on device.  Note: My aforementioned template has a ‘fake ads’ module that lets one test ads basic behaviors in the simulator.  I will be releasing the fake ads module in the future, but it is not ready for general consumption right now.

bird_climb_shop%2Bfakeads.png

  1. Where do you see the " childDirectedTreatment" in the documentation? Do you mean:

    applovin.setHasUserConsent( hasUserConsent )

  2. Are you redefining applovin anywhere? Is the definition you expect to use still in scope. Try adding the applovin def right above the request to hide. From what little code you provided I don’t believe your previous definition would still be in scope.

    local applovin = require( “plugin.applovin” ) applovin.hide(“banner”)

@roming do you have a video of this new template?

I know we cannot see ads in simulator, but I can put load and show functions in menu to “load” or “show” interstital and video ads, at least it does not show error message, but if I want to hide banner it gives me error, and game stops.

COPPA

I do not collect any data (exept using Applovin) and users must confirm they are over the age of 16. The game is ok, anyone can play it, but it does not target children as its primary audience. So, should I set childDirectedTreatment to false or true?  :slight_smile:

I do not understand this thing, 

Edit: I see childDirectedTreatment in Appodeal documentation, so just asking, I do not want to miss something.

Appodeal? or Applovin? What provider are you using?

Here is applovin:

https://docs.coronalabs.com/plugin/applovin/index.html

Here is appodeal:

https://docs.coronalabs.com/plugin/appodeal/index.html

I use Appodeal for one game and I want to use Applovin for another game. So, I see childDirectedTreatment in Appodeal documentation and I wonder is there any way to set this if I use Applovin, or it is enough to use this

applovin.setHasUserConsent( true )

Just because one plugin has an API call like .setHasUserConsent() doesn’t mean another plugin has the same API call. Applovin uses this API call. Appodeal passes a true/false value on it’s .init() call.

Also I don’t think you need to worry about childDirectedTreatment. The default is to show ads that show for everyone. By setting childDirectedTreatment to true, you only get COPPA compliant kids ads if your app is specific to 13 and under. 

Rob

Ah yes.  I assumed you were asking about a feature that the AppLovin plugin provides. 

I was just working with both Appodeal and Applovin so I know what the COPPA flag is, but I didn’t bother to confirm you were taking about the correct plugin.

Thank you everyone.

@android you set the under 16 in the control panel in Applovin for the app. If you are using the free version of the plugin, you will need to contact corona to make sure they make the same change to the impressions that they take.

The hasConsentFlag is also not necessary to set. In the Applovin control panel, you can set the consent is always false for EU persons.

  1. Dialog - If you want to show a dialog with a question use: 

https://docs.coronalabs.com/api/library/native/showAlert.html

For example, in my ‘Bird Climb - Skinning & Modding Template’ I have an option to show this dialog:

gdp_dialog.png

2.  childDirectedTreatment  - If your app is COPPA compliant you set it to ‘true’

**UPDATE** Does not apply.  OP was asking about AppLovin which does not support a COPPA setting.

3.  Ads in Simulator  - You cannot (by default) test Ads in the simulator.  Only on device.  Note: My aforementioned template has a ‘fake ads’ module that lets one test ads basic behaviors in the simulator.  I will be releasing the fake ads module in the future, but it is not ready for general consumption right now.

bird_climb_shop%2Bfakeads.png

  1. Where do you see the " childDirectedTreatment" in the documentation? Do you mean:

    applovin.setHasUserConsent( hasUserConsent )

  2. Are you redefining applovin anywhere? Is the definition you expect to use still in scope. Try adding the applovin def right above the request to hide. From what little code you provided I don’t believe your previous definition would still be in scope.

    local applovin = require( “plugin.applovin” ) applovin.hide(“banner”)

@roming do you have a video of this new template?

I know we cannot see ads in simulator, but I can put load and show functions in menu to “load” or “show” interstital and video ads, at least it does not show error message, but if I want to hide banner it gives me error, and game stops.

COPPA

I do not collect any data (exept using Applovin) and users must confirm they are over the age of 16. The game is ok, anyone can play it, but it does not target children as its primary audience. So, should I set childDirectedTreatment to false or true?  :slight_smile:

I do not understand this thing, 

Edit: I see childDirectedTreatment in Appodeal documentation, so just asking, I do not want to miss something.

Appodeal? or Applovin? What provider are you using?

Here is applovin:

https://docs.coronalabs.com/plugin/applovin/index.html

Here is appodeal:

https://docs.coronalabs.com/plugin/appodeal/index.html

I use Appodeal for one game and I want to use Applovin for another game. So, I see childDirectedTreatment in Appodeal documentation and I wonder is there any way to set this if I use Applovin, or it is enough to use this

applovin.setHasUserConsent( true )

Just because one plugin has an API call like .setHasUserConsent() doesn’t mean another plugin has the same API call. Applovin uses this API call. Appodeal passes a true/false value on it’s .init() call.

Also I don’t think you need to worry about childDirectedTreatment. The default is to show ads that show for everyone. By setting childDirectedTreatment to true, you only get COPPA compliant kids ads if your app is specific to 13 and under. 

Rob

Ah yes.  I assumed you were asking about a feature that the AppLovin plugin provides. 

I was just working with both Appodeal and Applovin so I know what the COPPA flag is, but I didn’t bother to confirm you were taking about the correct plugin.

Thank you everyone.