Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not receiving any notification from FCM Firebase cloud messaging when application is swiped from recent application list in OnePlus 3 [duplicate]

I'm using OnePlus 3 (7.1.1) There is one problem of not receiving notification when application is swiped from recent task (becomes dead) and then after if I push a notification from Firebase console, it won't receive any notification.

Any solution? Same bugs are on with vivo, oppo, huwai, xiomi, redimi, MI

And the same code works fine with Sony, Samsung moto.!

like image 665
Anshul Verma Avatar asked Dec 23 '22 15:12

Anshul Verma


1 Answers

You need to whitelist your app in the one plus settings. Chinese manufacturers block apps from running in the background. You would face a simillar situation in Xiaomi, Vivo, gionee, Oppo etc.

As for Xiomi ...go the security app ..auto start and allow your app to run in the background. This is a device specific thing and there is no code solution to it. You have to manually enable it. Hope it helps!

like image 119
Sarthak Mishra Avatar answered Mar 09 '23 00:03

Sarthak Mishra