我在 react native android 上使用 FCM 推送通知,但问题是我能够接收通知,它出现在控制台上,但未显示在设备或模拟器上。
我的代码如下
componentDidMount(){
PushNotification.configure({
onRegister: function (token) {
console.log('TOKEN:', token);
},
onNotification: function (notification) {
console.log('NOTIFICATION:', notification);
//I AM ABLE TO SEE THE CONSOLE LOG BUT NOTIFICATION DOESN'T APPEAR ON THE DEVICE
},
senderID: "",
permissions: {
alert: true,
badge: true,
sound: true
},
popInitialNotification: true,
requestPermissions: true,
});
}