Expo push notification behavior - react-native

I'm new in react-native development. I try to set notifications with expo-notification on my app. I receive notifications on Ios & Android. When my app is already open via the expo qr code, the notification redirect the user to the right screen on my app. But when my app is not open, the notification opens the expo app instead of mine. Is it the expected behavior?

Related

Push notifications not working in Expo Go

I don't receive push notifications when testing the app in Expo Go with physical devices. However it seems to work fine in a standalone (builded) app.

Firebase push notification not working on ios but works on android react native: How to configure react native firebase ios push notifications

Hi Firebase push notification not working on the ios side. I am using react native and this is the tutorial I used to set it up on ios https://rnfirebase.io/messaging/usage/ios-setup. Everything is set up but nothing happens when I send notification from firebase console.
Could it be an issue with the apple push notification service ssl certificate?

react-native-firebase - Open app from Headless JS Service / Open app from received notification in background mode

I read
How to handle notification when app in background in Firebase
Open app on firebase notification received (FCM)
But these aren't the solution for react-native-firebase.
I'm using react-native-firebase to handle notifications. In foreground, everything works well. I stuck with background state.
I'm working on a chat project and making 1-to-1 call feature. I push data-notification to clients when they have a call. In iOS, I used CallKit when client received notification, and it worked fine. But in Android I have a problem:
I can show ConnectionService UI for a call, but can't connect to my web socket server because it runs on Headless JS service. So I tried to auto open the app. I want to show a call screen as Skype, and accept/deny the call. (Skype can launch the app when I have a call)
Summary, successful steps:
Receive call notification in foreground state and show calling screen.
Receive call notification in background/closed state and show calling screen on iOS.
Receive call notification in background/closed state on Android.
Stuck here:
Show calling screen in background/closed on Android ???
TL;DR - How to launch/run/open Android app from Headless JS Service?
I dig into react-native-firebase, it catches the notification on onMessageReceived and send notification message to Headless JS Service.
// If the app is in the background we send it to the Headless JS Service
Intent headlessIntent = new Intent(
this.getApplicationContext(),
RNFirebaseBackgroundMessagingService.class
);
headlessIntent.putExtra("message", message);
this
.getApplicationContext()
.startService(headlessIntent);
HeadlessJsTaskService.acquireWakeLockNow(this.getApplicationContext());
Any help would be appreciated
This library is helpful to open app from background state.
React Native Launch Application
If your app is quit from background state
you've to register registerHeadlessTask in index.js like this
AppRegistry.registerHeadlessTask(
'ReactNativeFirebaseMessagingHeadlessTask',
() => notificationActionHandler,
);
and in notificationActionHandler function call libraries function to open app
If your app is in background you can subscribe this
messaging().setBackgroundMessageHandler(remoteMessage => {
console.log('setBackgroundMessageHandler', remoteMessage.data);
})

push notification is not working in iOS in react-native-fcm

I have added firebase for the push notification in my react native application but i am only getting in android not in iOS. I have checked all the set up in my xcode and firebase all are correct but still i am not able to get notification message in iOS. Any one can help me to resolve this issue.
.

using expo push notification, iOS device cannot receive push

My iPhone cannot receive push notification from my expo app.
I checked Device Token must be made.
I already checked notification permission.
Other Expo Push Test apps also not work
My iPhone can receive push from Other apps
What should I do? is Expo's problem?