Open Flavioamorim opened 7 years ago
Did you tried the example code?
Hi,
I'm having the same issue on Ionic 1 also, although the pub is showing up, both banner and interstitial.
The errors are: Uncaught (in promise) adView is null, call createBannerView first. Uncaught (in promise) interstitialAd is null, call createInterstitialView first.
Is this an issue with Ionic 1 only?
Thanks and Regards
Prepare ads first. This happens if banner or interstitial is not prepared. Then in LOAD
events show the ad.
@ratson It's not ionic 1 related. I use the plugin with ionic 1 and it works perfectly well.
also happen with ionic2/3 Android version
@lveigas have you solved the issue for Ionic 1?
These seem to be the "problematic" lines: https://github.com/ratson/cordova-plugin-admob-free/blob/b0d6945d7ebf29bfa193308458f5d69f00d880f6/src/android/banner/BannerExecutor.java#L173 and: https://github.com/ratson/cordova-plugin-admob-free/blob/b0d6945d7ebf29bfa193308458f5d69f00d880f6/src/android/interstitial/InterstitialExecutor.java#L127
Both return the reported errors, and note that there's a very similar phrase but without the .
(dot) in the end....
Hi @rodrigograca31,
Yes, I did solve it, but I don't remember exactly how since it was a long time ago, but I believe it was by preparing the ads first, invoking createBannerView and createInterstitialView methods before showing the ads.
Hope this helps.
Regards, Luís Veigas
I did some testing and seems "the problem" for banners at least is because we are using autoShow: true
and then admob.banner.show()
but the ad was already shown so there's no adview
hello,
I'm trying to use the interstitial banner, but I always return the same error: interstitialAd is null, call
I am using ionic 1 and am calling the above code in method: $ionicPlatform.ready(function() {});
help me please