Reputation: 23
I am developing an android app which uses alarm manager's setrepeating method for setting repeat alarms and then showing notifications though onreceive of the receiver when the alarm triggers.But there is a problem.
When I swipe the app off from the devices like Samsung Galaxy,it works well and notifies through alarm but in Le2,the alarm is destroyed and hence the notification is not shown.Even if I open the app again,the old alarm set is lost.I went through many answers but those just tell about the device problem(Le2) that force stops the app when swiped.None of the answers gave a good solution.
Upvotes: 2
Views: 572
Reputation: 23
Got it. In Leeco LE2, just go to settings -> battery -> power saving management -> app protection and disable your app for auto cleaning. Works now. It's because the manufacturer has messed up lot of things to improve battery life and hence has become nightmare for developers to catch the solution.
Upvotes: 0
Reputation: 644
Some of the phone manufacturers e.g. XiaoMi and MeiZu disallow the application from running in the background unless user allow it.
For XiaoMi, user can grant the access to app by adding it to AutoStart list. If not mistaken, Le2 has same function in the "App Protection" under phone manager app.
Upvotes: 1