Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

Banner overlap webview after interstitial ad was showed #107

Open
AI111 opened this issue Sep 3, 2017 · 5 comments
Open

Banner overlap webview after interstitial ad was showed #107

AI111 opened this issue Sep 3, 2017 · 5 comments

Comments

@AI111
Copy link

AI111 commented Sep 3, 2017

code for banner creation

public initBunner():void{
    this.admobFree.banner.config({
      id: config[this.platformName].bannerId,
      isTesting: true,
      autoShow: false,
      overlap: false,
      offsetTopBar: false,
      bannerAtTop:false
    });
    this.admobFree.banner.prepare()
      .then(() => this.admobFree.banner.show())
      .catch(e => console.log(e));  
  }

code for interstitial creation

public showFullScreenBanner(){
    this.admobFree.interstitial.config({
      id: config[this.platformName].interstitialId,
      autoShow: true,
      isTesting: false
    })
    this.admobFree.interstitial.prepare()
      .then(() => {
        // banner Ad is ready
        // if we set autoShow to false, then we will need to call the show method here
      })
      .catch(e => console.log(e));
  
  }

Banner creating when app start

@Component({
  templateUrl: 'app.html'
})
export class MyApp {
  rootPage: any = Login;
  @ViewChild(Nav) nav: Nav;

  constructor(private platform: Platform,
              private statusBar: StatusBar,
              ...
              private adMobBanner: AdMobBanner,
              private authService: AuthService) {
    platform.ready().then(() => {
      if(!firsRun && !authService.isAuthorized())this.rootPage = TutorialPage;
      this.splashScreen.hide();
      tthis.adMobBanner.initBunner();
...
}
}

Interstitial calling in ionViewDidLoad of nested component

  ionViewDidLoad(){
    this.adMobBanner.showFullScreenBanner();
  }

After i close Interstitial ad banner, Bottom banner overlap page
photo
If I hide and show app, bottom banner works well

@RafilAlArs
Copy link

RafilAlArs commented Sep 16, 2017

Happened with me Banner overlap webview after interstitial ad was dismissed on ios only
in theory I think the solution is to hide the banner before showing the interstitial and showing it again when is dismissed.

@AI111
Copy link
Author

AI111 commented Sep 17, 2017

My hotfix, just redraw banner after interstitial close

    document.addEventListener("admob.interstitial.events.CLOSE",() => {
      adMobBanner.showBanner();
    }, false)

@khoabuidev
Copy link

I have the same problem with Al111 and cannot solve that problem. Now I am not use banner on IOS anymore.

@cmartinezv
Copy link

Removing statusbar plugin solved the issue.

ionic cordova plugin rm cordova-plugin-statusbar

@ivanjx
Copy link

ivanjx commented Feb 9, 2019

FYI, this also happens when signing in with google and facebook oauth (as they open new window). This also happens on admob pro version. I fixed mine by just hiding and showing the ad again after showing interstitial ad and showing fb and google oauth login page:

admob.banner.hide();
admob.banner.show();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants