invertase / notifee

⚛️ A feature rich notifications library for React Native.
https://notifee.app
Apache License 2.0
1.88k stars 228 forks source link

IOS & ANDROID: Not able to get quick actions when app is in background or kill/quit state #1032

Closed jacquesngomeheffa closed 7 months ago

jacquesngomeheffa commented 7 months ago

I am not able to get quick actions when app is in background or quit/kill state on IOS and Android. I do see it when the app is in foreground.

If a push notification is sent from the backend,

App is in the foreground: Action buttons appear normally App is in the background: Action buttons don't appear App is killed: Action buttons don't appear Please guide me on how to make action buttons appear when the app is in the background or killed (Scenario 2 & 3). Seems to be an issue with notifee.

I'am using expo development enviroment. Please a I need your help

FancyLobster commented 6 months ago

@jacquesngomeheffa Hello, what was your fix for this issue (if any)?

jacquesngomeheffa commented 6 months ago

@jacquesngomeheffa Hello, what was your fix for this issue (if any)?

@FancyLobster It wasn't a issue at all. Notifee is working corretly. The problem was with the firebase messaging().setBackgroundMessageHandler.

I'm using expo, messaging().setBackgroundMessageHandler is not working corretly in development, only in production. You beter put it outside the App() like this otherwise it won't work image

Inside the remoteMessageBackground you can call your notifee actions.

From the backend I'am using the admin.messaging().send(message), to push the notification. It looks like this my backend image

Now Everything Is Working Correctly for Me. I hope this helps you