Ads

Google Admob - Banner & Interstitial

Config Adsense

We use firebase remote configarrow-up-right to set ad unit id, In this app you must replace this 3 ID with your own data, at file res/xml/remote_config_defaults.xml Data from this file use as default value, anytime you want to change you can change it from firebase remote console.

here how to get ad app id and unit id https://support.google.com/admob/answer/7356431?hl=enarrow-up-right

remote_config_defaults.xml
<entry>
    <key>ad_app_id</key>
    <value>ca-app-pub-3239677920 . . .</value>
</entry>

<entry>
    <key>banner_ad_unit_id</key>
    <value>ca-app-pub-32396779206 . . .</value>
</entry>

<entry>
    <key>interstitial_ad_unit_id</key>
    <value>ca-app-pub-32396779206 . . .</value>
</entry>

Set Remote Config

Parameter value must add for remote config must be same with value from file res/xml/remote_config_defaults.xml we can see we have 3 parameter for admob need, so you must add it all to remote config. 1. ad_app_id 2. banner_ad_unit_id 3. interstitial_ad_unit_id Here tutorial how to add update remote config http://blog.dream-space.web.id/?p=220arrow-up-right

Disable

new we make easy way to disable or enable adsense in the app, you only need to set boolean value with TRUE or FALSE

Last updated