Admob shows Test ads but not real ads

前端 未结 14 866
-上瘾入骨i
-上瘾入骨i 2020-12-02 22:24

I\'m using admob for showing android ads. The test ads are working fine but real ads are not shown. Also, I\'ve no issue with real interstitial ads as they work fine. Just t

相关标签:
14条回答
  • 2020-12-02 23:19

    To create a Live Ad unit id

    Sign In to

    https://apps.admob.com

    1. in the left side menu click on ->Apps
    2. add app
    3. choose whether you have published your app on Google Play or the App Store
    4. if no -> Enter your app information
    5. Create Ad unit
    6. replace the test Ad unit with the new Ad unit.
    7. you get to see the AD once the app is published to playstore!

    inside your xml add AdView

      <com.google.android.gms.ads.AdView 
        xmlns:ads="http://schemas.android.com/apk/res-auto"
        android:id="@+id/adView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
    
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        ads:adSize="BANNER"
        ads:adUnitId="@string/banner_ad_unit_id">
      </com.google.android.gms.ads.AdView>
    

    inside Strings <string name="banner_ad_unit_id">your_new_ad_unit</string>

    in your java code

     AdView mAdView = (AdView) v.findViewById(R.id.adView);
     AdRequest adRequest = new AdRequest.Builder().build();
     mAdView.loadAd(adRequest);
    
    0 讨论(0)
  • 2020-12-02 23:20

    Below is the official answer for time required to pass in order to display live ads.

    How long does it take for ads to begin appearing after the first ad request?

    When apps are newly registered with AdMob, it typically takes up to an hour and a few ad requests to allow inventory to build. Because of this, you may not see live impressions immediately.

    Note: In some cases, it may take longer than an hour. Please wait 24 hours before seeking additional help.

    Once your app is making more requests, you should see more consistent results. Please note that test ads operate through the same channels as live ads. Being able to return a test ad ensures that your application is communicating properly with our network.

    Source: https://support.google.com/admob/answer/2993019?hl=en

    0 讨论(0)
提交回复
热议问题