I am doing a project in ionic 3. Here in my project I'm using FCM version 2.9.2 for push notifications. There is no problem in android. In IOS, FCM Backgroundmode notifications is working fine. To handle FCM foreground notification i used the Local Notification plugin
ionic cordova plugin add [email protected]
Here is the code to handle local notification when ever i receive FCM foreground notification
// Declaring cordova
declare var cordova;
//Code to handle local notification
cordova.plugins.notification.local.schedule({
title: 'My Local notification',
text: 'Notification From Foreground...',
foreground: true
});
The problem is when ever i receive a FCM notification in foreground, instead of showing a Local notification i am getting an alert with message(Testing fcm notification with alert).
My requirement is to show a local notification when ever i receive a fcm notification in foreground. Is there any way to handle this.
Thanks in advance..