I need to implement a push service Notifications in React Native

Asked

Viewed 116 times

1

I am working on an app for doctors, in this application I need to notify the user when the time of scheduling is equal to the mobile.

Doubts and problems

  • How to do a function that compares the current time to the time of scheduling coming from the API, with the closed application, in the background, active and thus, notify the user

accept tips on how to do this in an easier way

I can make the code available, I didn’t put it here because I can’t develop this part

1 answer

1


Very interesting your problem, and I think you can solve this by scheduling the notifications, so try using the library React-Native-push-notification.

More specifically in this dot, where these scheduled notifications are specified.

A third question is how the scheduling data would get to your device, for that I would use a strategy of SSE (server sent Events), where the client is who hears events triggered by his backend. And here you can find a tool for it: SSE.

Soon the flow would be basically like this:

A scheduling is done -> The scheduling event is triggered -> the event information arrives on your device -> a new notification is scheduled

But remember: the Listener of events coming from the backend have to work in the background and for this there are several solutions, one that I really like is the React-Native-background-actions, worth taking a look.

I hope I’ve helped !

  • I don’t know the technology but the idea is right, this kind of processing has to be done on the server side and informed via push notification For the mobile app, the mobile platform generally supports waking and notifying apps that are dormant or disconnected for resource-saving reasons. + 1

  • Excellent, thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.