[ISSUE] Getting Web page not available https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html

I have added ADMOB_APP_ID to config.xml and also when i am installing the admob free
cordova plugin add cordova-plugin-admob-free --save --variable ADMOB_APP_ID=“my id”
Getting admob sucesss in console but i cant see popup and all.
When i am clicking the button of showBanner i can see in chrome inspect that web page not available.

code:

showBanner() {
 
  let bannerConfig: AdMobFreeBannerConfig = {
      isTesting: true, // Remove in production
      autoShow: true,
     // id: ''
  };

  this.admob.banner.config(bannerConfig);

  this.admob.banner.prepare().then(() => {
      // success
      console.log("admob Success!")
  }).catch(e => console.log(e));

}

launchInterstitial() {

  let interstitialConfig: AdMobFreeInterstitialConfig = {
      isTesting: true, // Remove in production
      autoShow: true,
     // id: ''

  };

  this.admob.interstitial.config(interstitialConfig);

  this.admob.interstitial.prepare().then(() => {
      // success
      console.log("admob Success!")

  });

ionic info
:\indraraj\test-ionic\test>ionic info

Ionic:

ionic (Ionic CLI) : 4.4.0 (C:\Users\HP\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.2
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 10 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\HP\AppData\Local\Android\Sdk)
NodeJS : v8.14.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

build gradle

project.ext {
defaultBuildToolsVersion=“27.0.1” //String
defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default
defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default
}

Thank you

Anyway now i can see ads from admob free

Out of the blue? I am struggling with that for almost 2 weeks now, can’t get it to work.

same above main thread code worked you can use my code and bind both method to button and do a small test
Make sure that you have added ADMOB_APP_ID in config.xml
let me know if that works

1 Like