I'm using the react-native-push-notification module to trigger local notification in my React Native apps.
In PushNotification.localNotification(details)
, the details
object takes one id
property which can then be used to clear a local notification.
What I'm wondering is: are these IDs shared by all the apps running on the phone or are they specific to the React Native app?
Basically I'm wondering do I need to make it random so that it doesn't conflict with another app, or can it be just an ID specific to my app incremented every time?
Because it's a local notification I assume it uses NotificationManager.notify to send it.
Here is what the Android documentations says:
Post a notification to be shown in the status bar. If a notification with the same id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.
The ID should be unique for your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With