Quit State RNFirebase Handling Not Working on Android - Using Expo Router V2

25 Views Asked by At

I am trying to use RNFirebase to handle notifications in an Expo app using Expo Router V2. I am using a EAS Development Build and I am using an Android device to test. My Project structure mimics the standard Expo Tabs template - https://github.com/expo/expo/tree/main/templates/expo-template-tabs

What Works ? The RNFirebase Notif handling works perfectly both in Foreground & Background mode.

What does NOT work ? Notification is not handled when the App is Quit. I have tried a simple API hit and the use of Notifee to show a notification in the Background Message Handler.

I have tried to use setBackgroundMessageHandler in the Index.js (immediately after Imports & outside the Index component). It does not work. I moved the setBackgroundMessageHandler to the Root Layout (immediately after Imports outside the layout component though), but that does not work either. I have verified that I am sending the Android notification as "High" priority from FCM Note that the RNFirebase works in Foreground & Background mode well. It's only Quit mode that does nothing. So the message handling code doesn't seem to be an issue.

Any help / pointers to what will help me get RNFirebase to work with Expo Router V2 when the app is Quit ?

0

There are 0 best solutions below