Closed eikaramba closed 2 years ago
mhm okay it seems in the original firebase plugin this wasn't working for android as well ;) https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/1136
but i guess it could work. i mean i see the push output in the console, so theoretically the plugin could show a local notification. maybe out of scope however here, not sure.
using https://github.com/NativeScript/plugins/tree/main/packages/local-notifications now:
if(isAndroid && message.foreground){
LocalNotifications.schedule([{
title: message.title,
body: message.body,
icon: 'res://notification_icon',
silhouetteIcon: 'res://notification_icon',
thumbnail: false,
forceShowWhenInForeground: true
}]);
}
even when i set the boolean to true it does not show the notification when the app is in foreground. i can see that the variable is not used at all in the android source code. is that right? https://github.com/NativeScript/firebase/blob/af2b24ccc6f07727c09f1723537f32e0fb0066f4/packages/firebase-messaging/index.android.ts