简体   繁体   中英

How to get a AdMob unit id for android

In android how do I get a admob unit ID for when I haven't even published the app in google app store? It seems to get a unit id, you have to browse for your app in the app store. Is there a way to get it before uploading it there?

Thanks

If you already set up showing test ads in your application you can follow this tutorial:

https://support.google.com/admob/v2/answer/3052638

Add an application by just type in the Name of your app that you want to publish later. It doesn't have to be on the playstore yet!

You simple add a new ad to your application which you set up before at admob.

After finish creating the new ad you get an ad unit id for this specific ad which you can just replace with the test-ad unit id in your strings.xml . To don't get in conflict with the admob policy you should not show real ads when your app isn't published. This can lead to a block of your admob account.

If not follow this tutorial:

https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start

and use for your ad-unit-id :

ca-app-pub-3940256099942544/6300978111

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM