Hello Amin,
We need to touch various things here. First of all, AB actions are finally translated to the right Javascript code, so, there must no difference between use AB actions and Javascript, since at the end we are talking about Javascript code.
What I am thinking is that the AdMob plugin relies in Internet to work... that is, probably to show an ad one or more HTTP requests are required, so maybe the quality of the internet connection matter here. Maybe the second show is faster?
Are you try with the AdMob app sample? Can you see the same "slow" behaviour? When I try this sample in the past (not too much time ago) I can't note any "slow" behaviour... both "banners" and "interstitials" appaer reasonably well.
Hello Amin,
You are right, methods like "prepareInterstitial" can be good. In fact the AdMob Javascript plugin uses it... but also uses their argument "autoShow" set to true, which causes that the interstitial appear right after their preparation.
Taking a look at the AdMob plugin API, the API appear very, very easy to use.
So, maybe I can enhance the AdMob Javascript plugin in the near future, but, for now, you must use the AdMob API directly, Amin. My recommendation is that you forget the AdMob Javascript plugin complete, just follow and use the AdMob plugin API.
Then please... post here any problem that you can have and I will try to help you.
Hello Amin,
In principle, use the Cordova Custom plugins option like below must be enough:
So you must use the plugin's ID: cordova-plugin-admob
Additionally, the above can be also a valid way to do it if we need:
Hello Amin,
Just to note... remember that, as any other Cordova plugin, their API must be used inside or after the app Ready event.
Hello Amin,
The plugin documentation is our friend. :-) The Ready event note is valid for all the Cordova plugins, and, for Cordova itself: before the Ready event the Cordova's stuff and plugins are not available to use, so we must use it inside or after the Ready event. About the the plugin's installation flag, the AdMob sample don't use it... and works... but maybe it's becuause it's just a test... or maybe because I have the right Google Play services here in the Android SDK.
The plugin works very well, and, certainly their API is quite simple. However, my intention is to enhance the AdMob Javascript plugin of App Builder, in order to have available methods like to prepare the interstitials, but also to prepare and show videos, etc. But I need some time in order to work on it! So in the meanwhile, and, like always, we can directly use the Cordova's plugin Javascript API.
Hello Amin,
Yes; we can attach "general" events anywhere, maybe with a few cautions: attach it in a place that made it available for our purposes (if we attach events in a Button Click, they are not available until the button is clicked...), don't attach the same events twice (if this is possible), so, we must control it, or, attach the events in a place that is only executed one time in the app life, for example, the app Ready event.
Thanks for your kindly words, Amin! :-)
Hello Amin,
May you can want to continue directly using the AdMob Cordova plugin, which is perfectly right. Anyway, the AdMob Javascript plugin of App Builder has been enhanced to allows to prepare interestitials before show it, among other changes, fixes and enhancements. The AdMob sample has been also enhanced to show the latest Javascript plugin changes.
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.
This website uses some useful cookies to store your preferences.