Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xiaomi does not receive notification when application is not running

I am working on an application where I am using Google Push Notification. Application receives notification when it is running in Xiaomi phone otherwise when it's killed it does not receive notification.

If we want to receive notification if application is killed then we need to allow auto restart app manually from security app of xiaomi. I want any trick to do this programmatically without asking user. Is there any way to do this ?

enter image description here

http://en.miui.com/thread-33826-1-1.html

like image 784
N Sharma Avatar asked Jun 10 '15 05:06

N Sharma


People also ask

Why am I not getting notifications on xiaomi?

How To Fix Notifications On MIUI China. View the app information by pressing and holding on the app you want to enable notifications to. Enable auto start and allow all permissions. Enable notifications, and disable battery saving.

Why am I not getting notifications from certain apps?

So make sure you haven't accidentally hit any buttons to shut off that feature while browsing the app's settings. If you don't find the relevant settings in the app, you can turn on Android notifications for specific apps under Settings > Apps & Notifications > [App name] > Notifications.


1 Answers

There are five settings that needs to be done manually in case of xiaomi to properly run any application. I have done a lot of research on this and there's no way to fix these settings programmatically. These are the settings:

  1. Auto Start -> ON (Toggle and restart your app)
  2. MIUI Optimization under Developer Options -> OFF
  3. Memory Optimization under Developer Options -> LOW/OFF
  4. No restrictions on background activities under Battery & Performance Settings
  5. Battery Saver -> OFF

There are many other devices in which the manual settings needs to be done in order for the app to work as expected e.g. Lenovo, some Micromax devices. Companies impose these kind on restrictions on background activities to improve the overall battery life. Some apps like facebook and whatsapp work correctly as these might have been included as system apps.

like image 96
Aman Kaushik Avatar answered Oct 31 '22 12:10

Aman Kaushik