У меня проблемы с отображением уведомлений на андроиде с использованием реагировать родной.Я перепробовал много вещей.Вот код, с которым я закончил:
const channel = new firebase.notifications.Android.Channel('test-channel', 'Test Channel', firebase.notifications.Android.Importance.Max)
.setDescription('My apps test channel')
.setLockScreenVisibility(firebase.notifications.Android.Visibility.Public)
.setSound('default');
firebase.notifications().android.createChannel(channel);
this.notificationListener = firebase.notifications().onNotification((notification) => {
console.log("NOTIFICATION RCEIVED !!!!!!!!!!!!!!!!!!!!!!!!!");
var notif = new firebase.notifications.Notification()
.setNotificationId(notification._notificationId)
.setTitle(notification._body)
.setBody(notification._body)
.android.setChannelId(channel._channelId)
.android.setSmallIcon('ic_launcher')
.setSound("default");
firebase.notifications().displayNotification(notif);
});
Уведомление показывается в области уведомлений устройства, а значок уведомления показывает счетчик уведомлений, но никаких уведомлений переднего плана.Что мне не хватает?