Questions tagged [react-native-push-notification]

Installation

npm install --save react-native-push-notification or yarn add react-native-push-notification

react-native link react-native-push-notification

NOTE: For Android, you will still have to manually update the AndroidManifest.xml (as below) in order to use Scheduled Notifications.

228 questions
3
votes
0 answers

How to disable notifications on background state?

I use react-native-firebase/messaging: 6.4.0 and react-native-push-notification: 3.2.1 In background/quit state i get two notifications: 1. Default notification from react-native-firebase 2. Custom notification from…
3
votes
1 answer

How to set a custom sound in react-native-push-notifications remotely

I have configured remote notifications, and everything is working as expected. Now I want to set a custom sound to my remote notifications. I have tried many ways but these are not working. I am using react-native-push-notification and…
3
votes
1 answer

RNFirebase v6 Push Notifications are not coming both iOS&Android

I am trying to send notifications from firebase console to my react-native app I followed the poor documentation here as much as I understand: https://invertase.io/oss/react-native-firebase/v6/messaging/quick-start I installed…
3
votes
1 answer

How to add click action for push notification in React native

I want to navigate to particular app screen after click on remote push notification. How can i implement this with react native. I am using react-native-push-notification library
3
votes
0 answers

How to Ensure GCM/FCM Push Notifications Turn On Screen, Wake Up and Unlock Phone?

This is a general question about how to ensure that GCM push notifications wake up the device (i.e. unlock the screen, and turn the screen on) so that we can render a custom view and make the phone vibrate and ring. We have been using GCM…
3
votes
1 answer

Setting up react native push notification with wix react native navigation v3 - problem when app is closed

I am sending a notification that navigates the user to a specific screen when the notification is clicked. This works perfectly when the app is opened or running in the background, however, when the app is closed onNotification is not being…
3
votes
0 answers

Non cancellable notification React Native

I am working on feature where the user is reminded for a medication at a certain time and day. The user can not ignore the notification which means he has to either take the medication and snooze the reminder. It has to be a noncancellable…
3iL
  • 2,146
  • 2
  • 23
  • 47
3
votes
0 answers

PushNotificationIOS.getInitialNotification() always returns null when the app is not working

PushNotificationIOS.getInitialNotification() always returns null when the app is in dead state. I'm using react native 59. What seems to be the problem?
Mohammad
  • 31
  • 1
3
votes
2 answers

How to get Scheduled Local Notifications in react-native (ANDROID)

I am working on a react-native application where I need scheduled local notifications, So the user can receive push notifications at a specific time. I have tried already react-native-push-notification and scheduled all my local notifications. I…
A.Matt
  • 71
  • 6
3
votes
1 answer

Why isn't a device token being generated?

I'm trying to use react-native-push-notifications, and I've been stuck on this for a good few days now, and I just can't find a way to get it to work. I know it's been brought up a few times over the years, with varying degrees of success, and I've…
3
votes
2 answers

How to know if the app is open from the android notification tray?

How to know if the app is open from the android notification tray? For instance, I have closed the app (cleared from recent app list). but I receive notification from the backend websocket, i pressed it, it opens the app. So my question is, is there…
Fuji
  • 73
  • 2
  • 6
3
votes
1 answer

Android onNotification never called in react-native-push-notification

PushNotification.configure({ onNotification: function(notification) { console.log( 'NOTIFICATION:', notification); }, }) notification received form the server when i clicked on it app is opened but onNotification never called. i…
3
votes
3 answers

How to get all notifications with react-native-push-notification on Android, equivalent to PushNotificationIOS getDeliveredNotifications?

When the app is in background or closed, received push notifications go to top bar (Notification Center). Later on tapping one notification will open the app and invoke the onNotification callback for that particular message. In iOS,…
2
votes
0 answers

Notifications.requestPermissionsAsync() not show prompt to user - react native

i am facing problem related to requestPermissionAsync this method does not show prompt to the user. Any help would be highly appreciated Android Version: 12 Expo SDK: 47
2
votes
0 answers

how to open files from android download manager's notification in react native android?

I am trying to open pdf files which gets downloaded through the android download manager in react native . I have used rn-fetch-blob for this and I think am unable to set the path in the download manager... here is code for it ... tried opening…
1 2
3
15 16