React-native-fcm: onMessageReceived not called, when app is in killed state [Android]

Created on 11 Aug 2017  路  1Comment  路  Source: evollu/react-native-fcm

Hi @evollu

I want when the app is killed(removed from the task manager) and a notification is received. A function is called depending upon the data inside that notification.
How can i achieve this ?

onMessageReceived is called when the app is in foreground or background but not when its completely killed.

"react-native": "0.47.1",
"react-native-fcm": "^8.0.0",
testing on moto g4 play (android 6.0.1);

i am looking for something like the onNotification() method in this repo.
Basically i am looking for a function which is called when a remote or local notification is opened or received

Most helpful comment

did you send payload with only data property and no notification property? Otherwise it won't trigger onMessageReceived. It is a FCM behavior

>All comments

did you send payload with only data property and no notification property? Otherwise it won't trigger onMessageReceived. It is a FCM behavior

Was this page helpful?
0 / 5 - 0 ratings