在我的应用中,本地通知有时不会触发。没有具体情况。有时会触发,但有时不会触发。
我看到所有通知均已正确设置(安排),但不会触发通知。
设备: iPhone 6-iOS 10.3.3 iPhone 6-iOS 11.1.2
LocalNotifService.scheduleNotif(date,"message",mp3NameOntime);
我的通知服务:
static scheduleNotif(date,message,sound) {
PushNotification.localNotificationSchedule({
date: date,
/* Android Only Properties */
ticker: "Notification Ticker",
autoCancel: true,
largeIcon: "ic_launcher",
smallIcon: "ic_notification",
color: "#251278",
tag: 'Notification Tag',
group: "group",
ongoing: false,
visibility: "public",
/* iOS only properties */
alertAction: 'view',
number: "0",
/* iOS and Android properties */
title: "Title"
message: message,
playSound: true,
soundName: sound,
});
}
取消:
static cancelAll() {
PushNotification.cancelAllLocalNotifications();
}