question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't hide banner after initialize it

See original GitHub issue

Is this a bug report?

Yes

Environment

AdMob Plus Environment Info: System: OS: macOS 10.14.4 CPU: (8) x64 Intel® Core™ i7-7700HQ CPU @ 2.80GHz Memory: 181.52 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 9.5.0 - /usr/local/bin/node npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2 Android SDK: API Levels: 26, 27, 28 Build Tools: 27.0.3, 28.0.3 System Images: android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom IDEs: Android Studio: 3.1 AI-173.4907809 Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild Languages: Java: 1.8.0_181 - /usr/bin/javac npmPackages: com-sarriaroman-photoviewer: ^1.2.0 => 1.2.1 cordova-admob-plus: 0.27.0 => 0.27.0 cordova-android: 7.1.4 => 7.1.4 cordova-android-support-gradle-release: ^2.0.1 => 2.0.1 cordova-ios: 4.5.5 => 4.5.5 cordova-plugin-advanced-http: ^2.0.4 => 2.0.6 cordova-plugin-android-permissions: ^1.0.0 => 1.0.0 cordova-plugin-camera: ^4.0.3 => 4.0.3 cordova-plugin-device: ^2.0.2 => 2.0.2 cordova-plugin-file: ^6.0.1 => 6.0.1 cordova-plugin-file-transfer: ^1.7.1 => 1.7.1 cordova-plugin-geolocation: ^4.0.1 => 4.0.1 cordova-plugin-headercolor: ^1.0.0 => 1.0.0 cordova-plugin-inappbrowser: ^3.0.0 => 3.0.0 cordova-plugin-ionic-keyboard: ^2.1.3 => 2.1.3 cordova-plugin-ionic-webview: ^3.1.2 => 3.1.2 cordova-plugin-mauron85-background-geolocation: ^3.0.0-alpha.50 => 3.0.0-alpha.50 cordova-plugin-nativestorage: ^2.3.2 => 2.3.2 cordova-plugin-request-location-accuracy: ^2.2.3 => 2.2.3 cordova-plugin-splashscreen: ^5.0.2 => 5.0.2 cordova-plugin-statusbar: ^2.4.2 => 2.4.2 cordova-plugin-whitelist: ^1.3.3 => 1.3.3 cordova-plugin-x-socialsharing: ^5.4.4 => 5.4.4 cordova-sqlite-storage: 2.3.1 => 2.3.1 cordova.plugins.diagnostic: ^4.0.11 => 4.0.12 uk.co.workingedge.phonegap.plugin.launchnavigator: ^4.2.2 => 4.2.2 npmGlobalPackages: cordova: 8.1.2 ionic: 4.12.0

Steps to Reproduce

(Write your steps here:)

  1. Adding cordova plugin admob-plus
  2. Show the admob banner
  3. Trying to hide or remove the admob banner

Expected Behavior

The banner should be hidden when the method hide is called.

Actual Behavior

Nothing happens. Not any log and the banner is still visible after calling the hide method.

Reproducible Demo

  if(platform.is('cordova')){
        admob.banner.show({
          id: {
              android: 'ca-app-pub-XXX/XXX',
              ios: 'ca-app-pub-XXX/XXX',
            },
          position: 'bottom',
          size:'FULL_BANNER'
        });
        admob.banner.hide();
      }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
lreinercommented, Jul 7, 2019
    this.admob.banner.hide({
        android: '',
        ios: ''
      }
    )

this is the correct way to hide a banner. Hide function only allows AdUnitIdOption which looks like mentioned here: https://admob-plus.github.io/docs/ad-request-options.html

0reactions
berokappcommented, Dec 12, 2019

I doe it like that and its working function hidbaner() { admob.banner.hide({ android: ‘ca-app-pub-3940256099942544/6300978111’ });};

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to hide banner ad when navigating to next page in flutter?
Put your BannerAd initialization/ Declaration code into initState() function. This will show Banner in SecondPage. Step 3. Add this code in ...
Read more >
AdMob Show & Hide Banner Upon Screen Change
Hi - I have my AdMobs script which places the banners, which places the ads just fine. I'm trying to hide them when...
Read more >
How to Remove Banner in SharePoint Online Modern Page?
Navigate to the SharePoint Online site >> Click on Settings Gear >> Choose “Site Contents” · Open the “Site Pages” Library · Click...
Read more >
admob_banner_stabilizer | Flutter Package - Pub.dev
It only calculates the position of the widget and puts the ad in front of it. You can't hide ads.
Read more >
Adding an AdMob banner and native inline ads to a Flutter app
What you'll need · Android Studio 4.1 or later · Xcode 12 or later (for iOS development) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found