Java – Do I have to keep ‘DEVICE_ID_EMULATOR’ as the device ID for the ad

Do I have to keep ‘DEVICE_ID_EMULATOR’ as the device ID for the ad… here is a solution to the problem.

Do I have to keep ‘DEVICE_ID_EMULATOR’ as the device ID for the ad

I

just started using adMob with android studio and I have a short question. For the device ID in adRequest, I wrote the AdRequest.DEVICE_ID_EMULATOR, everything works fine when I run the app on genymotion, ads appear, etc., and it also works when I test on an actual phone device. What I want to ask is, do I leave the DEVICE_ID_EMULATOR as the device ID, or change to something else so that ads appear on every phone with my app installed?

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

Solution

Hello, let me explain briefly

Ads appear when you keep Device_Id_Emultor, and it appears if you delete it
The difference is that when you keep the ID it shows on your test ad, you don’t get a yield from it
When you test your app, keep the ID when you post a market review or remove the device ID

For testing

AdRequest adRequest=new AdRequest.Builder().addTestDevice(AdRequest.DEVICE_ID_EMULATOR)

Used to publish/earn real ads

AdRequest adRequest=new AdRequest.Builder(); .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)

Related Problems and Solutions