Closed sergip76 closed 11 months ago
@sergip76
After you delete it, you don't need to reload it, just display it.
@sergip76
After you delete it, you don't need to reload it, just display it.
- Your code is not correct, see documentation. https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/banner_ads.html
I have just tried your example in a clean app using only that code and the behavior is the same. Banner is loaded and shown correctly but It's not possible to show de banner after remove it (with or without loading it again).
@sergip76
See if it works
I'm using emi-indo-cordova-plugin-admob 1.3.9 "emiAdmobPlugin" And have the same problem after cordova.plugins.emiAdmobPlugin.removeBannerAd(); The " cordova.plugins.emiAdmobPlugin.showBannerAd() " Don't show the banner
@boazn0
New api loadBannerAd();
https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/banner_ads.html
@boazn0
New api loadBannerAd();
https://github.com/EMI-INDO/emi-indo-cordova-plugin-admob/blob/main/example/banner_ads.html
I add the loadBannerAd(); but still not always the banner is shown I think sometimes it is not enough to load the banner that fast, is there a way to wait and make sure the banner is loaded?
@boazn0
Sorry, I'll check now.
@sergip76 @boazn0
Bug report
Current behavior:
I load a banner ad with: cordova.plugins.emiAdmobPlugin.loadBannerAd( AdUnitId = "ca-app-pub-xxxxx/xxxxx", npa = "1", position = "bottom-center", size = "default", adaptiveWidth = 320, responseInfo = true, );
I show the banner ad with: document.addEventListener('on.banner.load', (banner) => { cordova.plugins.emiAdmobPlugin.showBannerAd(); });
I remove the banner ad with: cordova.plugins.emiAdmobPlugin.removeBannerAd();
I try to show it again with these options: 1) Loading the banner first: cordova.plugins.emiAdmobPlugin.loadBannerAd( AdUnitId = "ca-app-pub-xxxxx/xxxxx", npa = "1", position = "bottom-center", size = "default", adaptiveWidth = 320, responseInfo = true, );
2) Showing directly the banner: cordova.plugins.emiAdmobPlugin.showBannerAd();
Expected behavior:
Environment information
Cordova CLI version: 12.0.0 (cordova-lib@12.0.1)
Cordova platform version: android 12.0.0
Plugins & versions installed in project (including this plugin) cordova-plugin-badge-fix 0.8.10 "Badge" cordova-plugin-device 2.1.0 "Device" cordova-plugin-dialogs 2.0.2 "Notification" cordova-plugin-file 7.0.0 "File" cordova-plugin-inappbrowser 5.0.0 "InAppBrowser" cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard" cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview" cordova-plugin-local-notification-12 0.1.4 "LocalNotification" cordova-plugin-media 6.1.0 "Media" cordova-plugin-network-information 3.0.0 "Network Information" cordova-plugin-proguard 2.2.0 "Cordova plugin ProGuard" cordova-plugin-purchase 11.0.0 "Purchase" cordova-plugin-statusbar 3.0.0 "StatusBar" cordova-plugin-vibration 3.1.1 "Vibration" cordova-sqlite-storage 6.1.0 "Cordova SQLite storage plugin - cordova-sqlite-storage plugin version" emi-indo-cordova-plugin-admob 1.2.9 "emiAdmobPlugin" uk.co.workingedge.phonegap.plugin.istablet 1.2.0 "Is Tablet"
Dev machine OS and version, e.g.
Runtime issue
Android build issue: