BackgroundHandler is not invoked for iOS app killed state - firebase-cloud-messaging

BackgroundHandler is not invoked for iOS app killed state if content_available:true, and also FCM push notification not came inside the app while app is in killed state.

Related

When app goes in background state client disconnected from openTok session - React Native

connectionDestroyed event being triggered when the app goes into the background and client is disconnecting with session. However, session is still alive. So here, my question is that how can i reconnect client with existing session in openTok react native.

React Native app reloads clicking on push notification

I am using react-native-notifications. I am getting push notifications perfectly but the issue is when the app is in the foreground and received push notifications. I clicked on the notification, the app reloads instead of resuming and the app is in the foreground all this time. It happens for every single push notification.
The event handler on click of push notification is being called and app reloads. I am just doing console in the handler.
Notifications.events().registerNotificationOpened()
Tried singleTop, singleTask, or singleInstance in manifest file. no luck

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);
})

Not receiving network callbacks from livechat when my App is in background. Only on android on Ios it works fine

I have a chatting app and i am using livechat sdk to communicate between agent and client.When a chat is started {On chat started} callback is not received by the android app when its in background however its being received when its in foreground and its being received on the Ios app when its in background and foreground both.Is there anyway to capture the callback from livechat in background on android? Any help will be really appreciated.

Push Notification in objective-c when the App is Force Quit in Mac

How to push notifications when the user force quits the app or when the app is force killed from activity monitor?