简体   繁体   中英

FCM heads up notification

Tried all forums, but still can't make it work. Heads up notification is not working.

Tried max and high priority and vibrate full screen content, nothing is working. Using Android-Moto 5.1 version.

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

Finally, i found the solution. In cordova-fcm plugin MyFireBaseMessagingService.java file onMessageReceived method - below line is commented(send notification).

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

Hope it helps someone. I uncommented this line and added the priority it works fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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