Service Killed When App Cloes Just In Huawei Device
I make service to Toast a text always but just in huawei device service killed when i kill app. I don't know why? My service is: @Override public int onStartCommand(Intent intent,
Solution 1:
An old question, but I think it’s important to know that HUAWEI has a feature called “power-intensive app monitor“.
It kills every app that runs in the background for a long time unless user gives special permissions to it.
The path to do this: Settings -> Security & privacy -> Location services -> recent location requests: YOUR APP NAME -> Battery -> uncheck Power-intensive prompt, App launch: Manage manually: check all three positions: Auto-launch, secondary launch, run in background.
I don’t know if there's a way to do this programmatically. I think the best way is to create a sort of help activity and explain the user what to do if application won’t work.
Solution 2:
You should stop the service on the method @Override onDestroy()
Post a Comment for "Service Killed When App Cloes Just In Huawei Device"