繁体   English   中英

FCM抬头通知

[英]FCM heads up notification

尝试了所有论坛,但仍然无法正常工作。 抬头通知不起作用。

尝试了最高优先级并振动了全屏内容,但没有任何效果。 使用Android-Moto 5.1版本。

notificationBuilder.setDefaults(Notification.DEFAULT_ALL);
notificationBuilder.setPriority(Notification.PRIORITY_HIGH);

最后,我找到了解决方案。 在cordova-fcm插件MyFireBaseMessagingService.java文件中的onMessageReceived方法中-注释以下行(发送通知)。

sendNotification(remoteMessage.getNotification().getTitle(), remoteMessage.getNotification().getBody(), remoteMessage.getData());

希望它可以帮助某人。 我没有对此行发表评论,并添加了可以正常工作的优先级。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM