Ads

Google Admob - Banner & Interstitial

Config Adsense

Configure adsense, In this app we use firebase ads you must replace this 3 ID with your own data, at file res/values/strings.xml

<string name="ADS_APP_ID">ca-app-pub-3397136890800435~XXXXXX</string>
<string name="ADS_BANNER_UNIT_ID">ca-app-pub-3397136890800XXXXXXXXXX</string>
<string name="ADS_INTERSTITIAL_UNIT_ID">ca-app-pub-3397136890800XXXXXXXXXXXXXX</string>

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

public class AppConfig {
    // flag for enable/disable all ads
    public static final boolean ADS_ENABLE = true;
 
    // flag for display ads specific page
    public static final boolean ADS_MAIN_BANNER = true;
    public static final boolean ADS_SEARCH_PAGE_BANNER = true;
 
    public static final boolean ADS_SEARCH_PAGE_INTERSTITIAL = true;
    public static final boolean ADS_DRAWER_OPEN_INTERSTITIAL = true;
 }

Last updated