Open kurtnovice opened 7 years ago
What I did and worked for me is as following ;
window.FCMPlugin.onNotification(function (data) {
if (data.wasTapped) {
//Notification was received on device tray and tapped by the user.
console.log(JSON.stringify(data));
} else {
// Notification was received in foreground. Maybe the user needs to be notified.
console.log(data);
}
Hi folks,
I am quite new to this plugin. I get to configure my FCM android app and got to the point where I can send notif from a laravel server. The notification array is like this {title, body, sound}
I got to receive the push notification on my cellphone when I tested the app (yay!), however I have no clue how to handle it. When I tap on the notification, it goes back to my app and does nothing. Doesn't matter whether it's on the foreground or background, still it does nothing.
I tried to do ...
.. didn't work
The readme doesn't offer a clue, it simply says... If the user taps the notification, the application comes to foreground and the notification data is received in the JavaScript callback.
Am I missing something? Please help.