Hi all, I am trying to use the latest admob-pro plugin but it makes the app crash when switching to another view. Here is my setup:
app.run(function($ionicPlatform, $cordovaSplashscreen) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
if (window.AdMob) {
window.AdMob.createBanner(
{
adId: 'ca-app-pub-xxxxxxxxxxxxxxxxxxx',
autoShow: true,
position: window.AdMob.AD_POSITION.BOTTOM_CENTER
}
);
}
$cordovaSplashscreen.hide();
});
I installed the plugin with cordova plugin add cordova-plugin-admobpro
, the app loads, and as soon as I click another tab, the app crashes with the message “Unfortunately MyApp has stopped.”
Any help is appreciated.