I have set up an admob adview in my android app: The manifest:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-123456567787889990">
My xml:
<com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
ads:adSize="BANNER"
ads:adUnitId="ca-app-pub-0987784576567456234511"
ads:layout_constraintBottom_toBottomOf="parent"
ads:layout_constraintEnd_toEndOf="parent"
ads:layout_constraintStart_toStartOf="parent">
</com.google.android.gms.ads.AdView>
In my java code I have done the following:
MobileAds.initialize(this, "ca-app-pub-123456567787889990");
AdRequest adRequest = null;
if (BuildConfig.DEBUG) {
adRequest = new AdRequest.Builder().addTestDevice("EDDADA7CC97DD3A4AAD9123312312321").build();
} else {
adRequest = new AdRequest.Builder().build();
}
adView.loadAd(adRequest);
I understand that real ads are only to be used in production and I have to use test ads. However the test ads appear only on the one device(the device that I am testing on), its working properly there. However it does not appear on any other device. I sent an apk to my client and the ad-space always appears blank with no test-ad.
Is this the intented behavior or am I missing something?? Please help.