admob-plus: Can't hide banner after initialize it

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();
      }

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15

Most upvoted comments

    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