My real ads do not appear in my app, only the test ads

Asked

Viewed 366 times

0

Good afternoon, I’m making an app and I’m setting up the ads part using google admob, but when I put my ad ID does not appear in my app, it appears only with the test ID. I’m using an emulator to use android. And my ad blocks have been created for a long time. Do I need to publish my app to the play store for the ads to appear? Or my code is 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" />

//Codigo Java

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>

2 answers

0

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

One detail that is not well known on Admob is that actual ads will not appear until your Admob account is given the status of verified and this only happens after you log into your Admob account and fill in all available data about it (payment details, your address, etc... and anything else that can be filled in there).

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

inserir a descrição da imagem aqui

And to answer your last question: No, you don’t need to have your app posted for the real ads to start appearing. In my case, the real ads started appearing as soon as my account was verified, but I hadn’t even published my app.

More information

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

inserir a descrição da imagem aqui

And even if you can’t enter payment details before you reach your minimum winnings limit, there are other information you can and must fill out to have your account verified. For example:

  1. On the menu Settings, fill in your personal details.
  2. On the menu Payments, click the Manage Settings button, and fill in your address and verify that you have at least one registered payment user (end of page).
  • Good evening, I understand what you said, but where do I see if you’ve been checked or not? in my email has nothing to say, and when I opened the payment settings I could not put the way I will receive payments, because I need to achieve the minimum amount.

  • The email you will only receive a few days later, when your account is approved. I put more information in my original reply.

  • So I did what you said and I’ll post a print there to see how this now.

  • Aside from the fact that you put your screenshot in another answer, it seems you did everything right; now it’s wait. And if my answer helped you then mark it as correct.

  • So, my account was approved and appeared the same as in your print, but the ads did not appear in the app, in case I use an emulator to debug the app, I would have to install the app on a mobile phone?

  • I went to look at the Logcat, and it’s giving an error in the ad , the error number is 3, do you know what it might be? Is it lack of request?

Show 1 more comment

0

This is common. Admob ads are only actually shown when the application is published in the Play Store. When testing, avoid using registered Ids so you don’t run the risk of having an account suspended. Just don’t forget to put the registered Ids in the package for publication.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.