Ionic: Google Maps and Admob free
See original GitHub issue**I’m submitting a [ x] any problem or bug report
plugin version: (check one with “x”) [x ] 2.0.0-beta2
cordova information: (run $> cordova plugin list
)
com.googlemaps.ios 2.3.0 “Google Maps SDK for iOS”
cordova-admob-sdk 0.7.0 “AdMob SDK”
cordova-plugin-admob-free 0.9.0 “Cordova AdMob Plugin”
cordova-plugin-console 1.0.5 “Console”
cordova-plugin-device 1.1.4 “Device”
cordova-plugin-googlemaps 2.0.0-beta2-20170721-1617 “cordova-plugin-googlemaps”
cordova-plugin-splashscreen 4.0.3 “Splashscreen”
cordova-plugin-statusbar 2.2.2 “StatusBar”
cordova-plugin-whitelist 1.3.1 “Whitelist”
cordova-promise-polyfill 0.0.2 “cordova-promise-polyfill”
ionic-plugin-keyboard 2.2.1 “Keyboard”
Current behavior:
Hello, your plugin is very fantastic, it’s a great job, thank you very much.
I finalize my Ionic project, with plugin googlemaps, and I want insert Ad banner in all the page.
Without the plugin Ad mob, the google map display very good.
But when I insert the Ad banner, the screen of the page where is the map, is black.
An example of code
global packages:
@ionic/cli-utils : 1.5.0
Cordova CLI : 7.0.1
Ionic CLI : 3.5.0
local packages:
@ionic/app-scripts : 2.0.2
@ionic/cli-plugin-cordova : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.5.3
System:
Node : v6.10.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 5.0.13
npm : 3.10.10
Expected behavior:
Without Admob, the map display very well
Steps to reproduce:
- create ionic project
- install Google maps native: https://ionicframework.com/docs/native/google-maps/
- install Admob free: https://ionicframework.com/docs/native/admob-free/
- ionic cordova run android , on a LG device, Android version 5.0.1
Project bug example: https://github.com/jaylecorse/ionic-googlemap-admob.git
Screen capture or video record:
If your problem is solved, please consider small amount donation to this project. Appreciate for your kindness. https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/README.md#buy-me-a-beer
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (8 by maintainers)
Okay, I finally figured out the problem. This is completely the AdMob plugin’s problem.
The wrong point is here.
https://github.com/ratson/cordova-plugin-admob-free/blob/f8357d40aded044a2e477e8a165b6a3ac2617e78/src/android/banner/BannerExecutor.java#L213
The webview redraws the background when the setContentView() method executes.
In order to prevent redraw the background, get the parentView of webView, and re-instart a new view.
Great preparation. I will check it later.