Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent Notification Message with switch (ON/OFF) on Android/iOS?

I have a mobile app implemented in React Native where the user has a status online/offline. I want to implement a persistent notification message that shows up whenever the user status is Online, even if the app in the background.

I know that there is a possibility to do actions within notifications like pause button in the media player apps. How could this be done in react-native?

like image 259
Assem Avatar asked Oct 08 '17 12:10

Assem


1 Answers

Use https://github.com/zo0r/react-native-push-notification

If you want to make it sticky you can set :

PushNotification.localNotification({ ongoing:true )} You can use ongoing property of this library to make sticky notification

like image 56
Harshit Avatar answered Oct 18 '22 16:10

Harshit