How to test Admob in real device if without Ad unit id

杀马特。学长 韩版系。学妹 提交于 2019-12-05 19:39:35

You dont have to pay to open admob account. But, if you still want to test without an account, add your device ID to the adrequest, and you will see demo ads.

UPDATE:

Creating an admob account is free. However, you can use these dummy adunit IDS for testing:

Banner : ca-app-pub-3940256099942544/6300978111

Source

Interstitial: ca-app-pub-3940256099942544/1033173712

Source

You can also add emulator and actual device ids for testing:

   AdView adView = (AdView)this.findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder()
        .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
        .addTestDevice("TEST_DEVICE_ID")
        .build();
    adView.loadAd(adRequest);

This way your account won't be flagged for invalid clicks that leads to bans.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!