Here is the .run
angular.module('checklistApp', ['ionic','ionic.utils', 'checklist.controllers','ngCordova'])
.run(function($ionicPlatform, $cordovaAdMob, $window) {
$ionicPlatform.ready(function() {
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if (window.StatusBar) {
StatusBar.styleDefault();
}
if (typeof analytics !== 'undefined' && $scope.analyticOnOff == true){
alert("analytics function initiated");
analytics.startTrackerWithId('mycode');
analytics.trackView('app started');
}
alert("in ionic run");
})
});
This works fine in the browser but the alert does not run on my android phone using ionic run android.
The app seems fine otherwise. It was running the alerts yesterday and I was using them to try and find out how to get AdMob working.
But since yesterday I’ve had the following issues:
- AdMob not working despite much effort and absolute sticking to instructions afaik
- The CLI “ionic resources” failing yesterday and continuing to do so.
- ionic serve this morning not working at all. I needed to reinstall ionic.
Is there something wrong with ionic on the whole at the moment? It seems like everything I try is collapsing and it’s very odd. I feel like I can’t make any more efforts or do any coding today as I can’t test anything when every other thing doesn’t work - ie I don’t know where the problem is, at all.