简体   繁体   中英

Using Admob for testing vs live

I am finishing up my first app which includes Admob. I have entered my ad unit ID and it is working perfect. I am currently on beta testing, so in order to see 'test' adds, I added my own device using the recommended method:

AdRequest adRequest = new AdRequest.Builder()
.addTestDevice("xxxxxxxxxxxxxxxxxxxx").build();

I have 2 questions:

  1. For Beta testing, how can I prevent my testers to see the live ads without knowing their device IDs?
  2. For go-live, do I have to remove the addTestDevice() calls so I can see the real thing?

What is the usual procedure ?

For Beta testing, how can I prevent my testers to see the live ads without knowing their device IDs?

You have to know their device id, otherwise they will see real ads. However, you can get device id programatically to put it in addTestDevice() method. See this link

For go-live, do I have to remove the addTestDevice() calls so I can see the real thing?

It is not necessary to remove the addTestDevice() . But if you want to see real ads then yes it is necessary; though it is better to not remove addTestDevice() , that's how you can prevent yourself from accidentally clicking ads.

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