I'm using cordova-plugin-fcm for push notifications in case of background and app killed. In case of app in foreground, I'm scheduling local notification using the plugin. This is my code:
FCMPlugin.onNotification((msg) => {
this.notificationMsg = msg;
if (msg.wasTapped) {
// code for app background and app killed
}
else {
LocalNotifications.schedule({
id: 1,
title: 'title',
text: 'text',
})
}
})
But no local notifications comes up in foreground. But as soon as I minimize the app, it comes. What's the issue here? Anything to do with plugin version? Please help.