I created a mobile App (Ionic + Cordova/ngCordova). Installed Cordova Push Notifications, Cordova Local-Notification Plugin But when I get a push notification or off the screen I lose all my local notifications. And if check them by isScheduled function I get TRUE. If I remove a push notification code
var config = null;
if (ionic.Platform.isAndroid()) {
config = {
"senderID": "111111111111" // REPLACE THIS WITH YOURS FROM GCM CONSOLE - also in the project URL like: https://console.developers.google.com/project/434205989073
//"ecb": "window.onNotificationGCM"
}
} else if (ionic.Platform.isIOS()) {
config = {
"badge": "true",
"sound": "true",
"alert": "true"
}
}
$cordovaPush.register(config).then(function(result) {
// ** NOTE: Android regid result comes back in the pushNotificationReceived, only iOS returned here
if (ionic.Platform.isIOS()) {
$rootScope.regId = result;
scheduleNotifications.storeDeviceToken("ios");
}
}, function(err) {
navigator.notification.alert("Register error " + err);
});
it works ok. What can be wrong with this?