【问题标题】:FCM heads up notificationFCM 抬头通知
【发布时间】:2017-07-28 20:49:52
【问题描述】:
尝试了所有论坛,但仍然无法正常工作。提醒通知不起作用。
尝试了最大和高优先级以及振动全屏内容,但没有任何效果。使用 Android-Moto 5.1 版本。
notificationBuilder.setDefaults(Notification.DEFAULT_ALL);
notificationBuilder.setPriority(Notification.PRIORITY_HIGH);
【问题讨论】:
标签:
android
firebase-cloud-messaging
cordova-plugin-fcm
【解决方案1】:
最后,我找到了解决方案。在 cordova-fcm 插件 MyFireBaseMessagingService.java 文件中的 onMessageReceived 方法 - 下面的行被注释(发送通知)。
sendNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody(), remoteMessage.getData());
希望它可以帮助某人。我取消了这一行的注释并添加了它工作正常的优先级。