Answer the question
In order to leave comments, you need to log in
How can you implement local notifications in React Native?
I'm trying my hand at mobile development, I'm a complete novice in this business.
I need to make local notifications to the user on a timer. Moreover, they should not depend on whether he has an Internet connection. For example, at 4:00 p.m., the notification "It's time for tea" should appear. And on pressing the application itself opens.
I've googled but only find examples that require Firebase. If I understand correctly, this does not suit me, because without the Internet, notifications will not come, right? Also I tried react-native-push-notification
scheduleNotfication() {
console.log(new Date(Date.now() + (60 * 1000)));
PushNotification.localNotificationSchedule({
message: "Время пить чай", // message
date: new Date(Date.now() + (60 * 1000)) // your required time
});
}
Answer the question
In order to leave comments, you need to log in
I remember how I used this https://github.com/zo0r/react-native-push-notification
and as an option https://wix.github.io/react-native-notifications/d...
on the push emulator, notification is not works. Check if the application has permission to send notifications.
Here is the package that you zayuzal just the same you need, you just need to call it correctly, configure all the permissions, you always have to google in react native, so look for a solution on page 2 or 3. Well, of course, google in English, I think it will be possible to find
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question