how can i receive fcm notification to device even after app is killed from background or swipe out from memory. i have use Vivo,Oppo,Panasonic device. but didnt receive notification when app is killed .
Asked
Active
Viewed 1,627 times
0

Frank van Puffelen
- 565,676
- 79
- 828
- 807

chaitanya
- 11
- 3
-
please see https://stackoverflow.com/a/37845174/12647189 – Nathan Jan 21 '20 at 09:32
-
Does this answer your question? [How to handle notification when app in background in Firebase](https://stackoverflow.com/questions/37711082/how-to-handle-notification-when-app-in-background-in-firebase) – Nathan Jan 21 '20 at 09:32
-
Which type of notification you are using ```Data messages``` or ```Notification messages```? – Afsar edrisy Jan 21 '20 at 09:33
-
Does this answer your question? [Is it possible to receive FCM push notification when app is killed?](https://stackoverflow.com/questions/47398812/is-it-possible-to-receive-fcm-push-notification-when-app-is-killed) – Afsar edrisy Jan 21 '20 at 09:34
-
both@Afsar adrisy – chaitanya Jan 22 '20 at 11:24
1 Answers
0
Some devices have restrictions to start automatically. So if notification comes, your app will not receive the notification.
You have to enable Autostart for your app to work. There is a setting called "Autostart". Turn on that for your app.

Karthik
- 59
- 3
-
2Hi, welcome to SO! That will not work since the app's FMC service still needs to run. Next time when you answer a question please add a bit more context, you may be right with your answer, add some instructions/steps to show how to do it. – Nathan Jan 21 '20 at 09:47
-
Hi Nathan, if you need to understand about autostart in different devices. Please go through below link, https://stackoverflow.com/questions/44383983/how-to-programmatically-enable-auto-start-and-floating-window-permissions – Karthik Jan 21 '20 at 09:50
-
Sorry, no I do understand it, I'm saying you should add more information in your answers, I'm not the one asking the question. Autostart will not work with firebase, you'll need to use a FMC endpoint when the app is closed to receive notifications. – Nathan Jan 21 '20 at 09:52
-
There is nothing called FMC endpoint. Although some sources say that this is an issue of Firebase and more about the manufacturer who does not use Android's native ROM. Manufactures like One Plus, MI, Vivo, Oppo, etc use customised ROM (rewrite the behaviour of stock Android). So when the app is killed, all its services are also killed. So to solve this you can change their settings. – Karthik Jan 22 '20 at 03:05