My real ads don't appear in my app, only test ads

Good afternoon, I'm making an app and I'm setting up the ads part using Google admob, but when I Button my Ad ID does not appear in my app, it only appears with the test ID. I am using an emulator to use android. And my ad blocks have been created a long time ago. Do I need to publish my app to the play store for ads to appear? Or is my code wrong?

/ / Code AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="ca-app-pub-4462240214744405~5342560161" />

/ / Java Code

private AdRequest mAdRequest;
private AdView mAdView;


        //Carregamento ad
   
        MobileAds.initialize(this, new OnInitializationCompleteListener() {
        @Override
        public void onInitializationComplete(InitializationStatus initializationStatus) {
        }
    });

    //ad
    AdView adView = new AdView(this);
    adView.setAdSize(AdSize.BANNER);
    adView.setAdUnitId("ca-app-pub-4462240214744405/1315856688");
    mAdView =findViewById(R.id.adView1);
    mAdRequest = new AdRequest.Builder().build();
    mAdView.loadAd(mAdRequest);

/ / Layout

   <com.google.android.gms.ads.AdView
    android:id="@+id/adView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    app:adSize="BANNER"
    app:adUnitId="ca-app-pub-4462240214744405/1315856688"
    app:layout_constraintBottom_toBottomOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintHorizontal_bias="0.498"
    app:layout_constraintStart_toStartOf="parent"></com.google.android.gms.ads.AdView>
Author: Yuri Leite, 2020-08-09

1 answers

If your ads are showing up with the test ID this is usually a sign that the ads code has been implemented correctly, then at first I would rule out any errors in your code.

One detail that is not very well known in AdMob is that real ads will not appear until your AdMob account receives the status of verified and this only happens after you log into your AdMob account and fill in all the available data about you (data your address, etc... and everything else that can be filled there).

After you fill in your details, you will probably receive an email in the next few days saying that your account has been verified. The email looks like this:

insert the description of the image here

And answering your last question: No, you don't need to have your app published for real ads to start appearing. In my case, the actual ads started appearing as soon as my account went verified, but I hadn't even published my app yet.

More information

In addition to the email you will receive from Google saying that your account is verified, you will also see the following image when logging into your AdMob account:

insert the description of the image here

And even though you can't put payment data before you reach your minimum earnings limit, there is other information you can and must fill in to have your account verified. By example:

  1. in the Settings menu, fill in your personal data.
  2. in the payments menu, click the Manage Settings button, and fill in your address and verify that you have at least one registered Payment User (bottom of Page).
 0
Author: vegidio, 2020-08-12 05:09:14