I try to integrate ADMOB in my application but I do not understand why it does not work. when i try with google test ID it works but not with my ID. Here is my code: XML:
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adUnitId="ca-app-pub-3264484685894314/1550177632"
ads:adSize="BANNER" />
MainActivity:
AdView adView;
MobileAds.initialize(this, "ca-app-pub-3264484685894314~2467851098");
adView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
Est ce que mon code est bon?
The first ID of the photo I used for the MainActivity.java and the second ID for the xml layout