Interstitial ad shown in black (->) AFMA_ReceiveMessage not defined (: 1)

I followed the official Android guide for adding interstitial ads .

If I use test mode:

AdRequest adRequest = new AdRequest.Builder() .addTestDevice("my code here") .build(); mInterstitialAd.loadAd(adRequest); 

It works fine, and I see a demo adding an interstitial.

If I use release mode:

 AdRequest adRequest = new AdRequest.Builder().build(); mInterstitialAd.loadAd(adRequest); 

I see only black interstitial add and in the log red:

JS: Uncaught ReferenceError: AFMA_ReceiveMessage not defined (: 1)

+ Information:

  • I use the latest updated google play services.
  • I am trying to use 2 devices and 2 Wi-Fi networks.
  • In the same device, I see other interstitial ads of other applications.
  • This ad was created in adMob in the last 24 hours.
  • I'm trying to load add fron stream but application crashes
  • My adMob account is OK, I have other ads.

manifest:

 <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 

(...)

  <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" /> 

OnCreate Action:

  mInterstitialAd = new InterstitialAd(this); mInterstitialAd.setAdUnitId("here my add id"); mInterstitialAd.setAdListener(new AdListener() { @Override public void onAdClosed() { requestNewInterstitial(); } }); requestNewInterstitial(); 

In the application, a natural break:

  if (mInterstitialAd.isLoaded()) { mInterstitialAd.show(); } 
+6
source share
2 answers

The problem is resolved only after 22 hours from the moment the ad was created in AdMob.

0
source

Does your activity have web browsing? Comment code:

 //webview.pause(); 

And it works.

0
source

All Articles