4

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.!

KENdi
  • 7,576
  • 2
  • 16
  • 31
Anshul Verma
  • 347
  • 1
  • 5
  • 18
  • I've got the same issue and have been bumping my head since last one week. Please update here if there is any solution you find that can be done programmatically. As Whatsapp, Facebook, Amazon, etc popular apps are automatically white listed and they remain whitelisted after reboot even if you manually remove them from whitelisting and reboot. – Sachin Aug 18 '17 at 06:24

3 Answers3

5

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!

Sarthak Mishra
  • 1,033
  • 1
  • 11
  • 27
4

Yes If you use any Xiaomi phone you have to enable the app to run in the background. -To Enable go to setting>Permisssions>autostart and select your app. and enable to autostart.

Dream Developer
  • 400
  • 5
  • 20
1

Four things need to check to receive notification

  1. Auto Restart mode must be turn ON
  2. Background data
  3. Low Power Mode(Battar Saving mode)
  4. App's Notification Setting

vivo, oppo, huwai, xiomi, Redmi, MI all are Chinese vendors they customize stock android and blocks Auto Restart, Running in background mode.

For oppo I have fixed by implementing below steps

You can go to SECURITY CENTRE - PRIVATE PERMISSION - STARTUP MANAGER - add App to the STARTUP APPS ALLOWED

Go to SETTING - ADDITIONAL SETTING - APPLICATION MANAGEMENT - AUTOMATIC CLEANING -TURN OFF AUTOMATIC CLEANING

Go to SETTING - BATTERY - OTHERS - choose the app that you want to keep notification - turn off FREEZE BACKGROUND APPS

SETTING - NOTIFICATION AND STATUS BAR - MANAGEMENT NOTIFICATION - choose the apps - turn on PRIORITY NOTIFICATION

SETTING - BATTERY->Low Power Mode turn Off

Rajesh N
  • 6,198
  • 2
  • 47
  • 58