I study the development of applications for Android. Faced a certain problem, for the solution of which I already had almost all the resources. The problem is this: on the devices of some manufacturers Xiaomi, Meizu, Huawei (found information that even on some Samsung and ASUS devices) with their firmware installed services that kill processes to conserve battery power. So if you set Alarmmanager to allow it to send a notification at a specific time, then the notification simply does not come. I'm testing everything on the Meizu device, the notification comes if you specify the time in the Alarmmanager not to exceed the current time by more than 4 minutes (that is, if you set 4 minutes and lock the device, then the notification will come if more than 4 minutes then there is none). One would think that the problem is in the firmware, but applications such as Viber, VK and other messengers send notifications without problems. Already tried all the methods that I found on the Internet, but I have not found a solution to this problem. Maybe someone still faced this problem and found a solution to it. For the hint, I would be very grateful.
Asked
Active
Viewed 884 times
4
-
You can use notifications to achive the same goal. [See this link](https://stackoverflow.com/questions/42338215/keep-android-service-running-even-after-activity-is-closed) – Sayok Majumder Jul 27 '17 at 06:20
-
These devices also killed foreground service if you killed app from task manager ! – rushank shah Jul 27 '17 at 06:27
1 Answers
0
Yes devices like Xiaomi, Meizu, Huawei , asus etc has problem about the background services and broadcast receiver.
Yes its about the firmware only but application like , fb , whatsapp , viber and other social app will work on these devices without any problem.
Even this will kill your broadcast receiver as the application is killed from task manager.

rushank shah
- 856
- 1
- 9
- 28