0
Ich erhalte Benachrichtigungen, die von der FCM-Konsole gesendet werden, selbst wenn die App beendet wird. Hier ist mein Client-Code:FCM-Daten nicht empfangen, wenn die App beendet wird
$ionicPlatform.ready(function() {
FCMPlugin.onNotification(
function(data){
if(data.wasTapped){
//Notification was received on device tray and tapped by the user.
alert(JSON.stringify(data));
}else{
//Notification was received in foreground. Maybe the user needs to be notified.
alert(JSON.stringify(data));
}
},
function(msg){
console.log('onNotification callback successfully registered: ' + msg);
},
function(err){
console.log('Error registering onNotification callback: ' + err);
}
);
})
Das Problem ist die Meldung Anruf zurück nicht empfangen. Die Protokolldaten zeigt:
View not ready. SAVED NOTIFICATION: javascript:FCMPlugin.onNotificationReceived()