Testing admob before publish

后端 未结 2 1994
再見小時候
再見小時候 2020-12-14 23:28

I have fishished an android project and set up admob ads but it\'s not working, tried on emulator and phone. So how to check if admob works?

Code:

           


        
相关标签:
2条回答
  • 2020-12-15 00:11

    You can test AdMob in emulator also. You need the test mode to achieve that. See tutorial Step 6 for more info: How to integrate Admob into your app

    If you don't find the device ID in LogCat you can also try to add the TEST_EMULATOR constant:

    request.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
    
    0 讨论(0)
  • 2020-12-15 00:20

    All those links are obsolete, to test, replace your Banner ID for the one mentioned by Google here (section "Give your app an Ad Unit ID"): https://developers.google.com/admob/android/quick-start

    And replace your Interstitial ID with the one mentioned by Google here (section "Instantiating the InterstitialAd object"): https://developers.google.com/admob/android/interstitial

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