我正在开发一个React Native应用程序,需要定时本地通知,以便用户可以在特定时间接收推送通知。
我已经尝试使用React Native Push Notification并预定了所有本地通知。
我想要获取我所有预定的本地通知,在iOS中我使用PushNotificationIOS.getScheduledLocalNotifications,而在Android上我找不到方法。
PushNotificationIOS.getScheduledLocalNotifications(Localarray => {
console.log("getScheduledLocalNotifications", Localarray);
});
以上 ios 代码部分将当前预定的本地通知存储在数组中。
scheduleLocalNotificationAsync
https://docs.expo.io/versions/v32.0.0/sdk/notifications/#notificationsschedulelocalnotificationasynclocalnotification-schedulingoptions - sinan