Nativescript 当应用程序在android平台的前台时,Firebase推送通知不显示

Nativescript 当应用程序在android平台的前台时,Firebase推送通知不显示,nativescript,nativescript-angular,Nativescript,Nativescript Angular,我正在使用nativescript angular框架开发android和iOS应用程序。我正在使用fcm推送通知插件。在iOS平台上,通知在前台和后台都会出现。但在安卓系统中,只有当应用程序在后台时才会发出通知 我们如何解决这个问题 我的firebase初始化代码: firebase.init({ showNotifications:true, showNotificationsWhenInForeground:true, onPushTokenReceivedCal

我正在使用nativescript angular框架开发android和iOS应用程序。我正在使用fcm推送通知插件。在iOS平台上,通知在前台和后台都会出现。但在安卓系统中,只有当应用程序在后台时才会发出通知

我们如何解决这个问题

我的firebase初始化代码:

firebase.init({
    showNotifications:true,
    showNotificationsWhenInForeground:true,

    onPushTokenReceivedCallback:(token)=>{
        console.log("onPushTokenReceivedCallback:",{token});
    },
    onMessageReceivedCallback:(message:firebase.Message)=>{

        console.log("onMessageReceivedCallback:",{message});
})
.then(()=>{
    console.log("Initialized");
})
.catch(error=>{
    console.log("Initialize",{ error });
});

我现在也在和通知做斗争

你可以和firebase插件一起使用插件,比如我,你可以有更多的定制通知,并且可以在客户端更好地处理它们。 只要在收到firebase回调时安排一个本地通知

它在前台工作得很好,我正在努力让它在后台工作,在后台我只是不断收到Firebase通知,无法禁用它