Admob shows Test ads but not real ads

前端 未结 14 874
-上瘾入骨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

      
      
    

    inside Strings your_new_ad_unit

    in your java code

     AdView mAdView = (AdView) v.findViewById(R.id.adView);
     AdRequest adRequest = new AdRequest.Builder().build();
     mAdView.loadAd(adRequest);
    

提交回复
热议问题