1

Testing my app which runs background service( Can be sticky or non sticky), on Samsung devices like Note 5 or Galaxy S7. I left the phone idle for 3 days (not plugged). After 3 days (approximately 73 hours), service was not running. How to avoid Samsung killing the app? As it looks like it has nothing to do with Doze or App Standby, as they don't kill the app or service.

Also noticed that samsung categorises the apps in App Power Saving menu. Either assigns app as "Auto Save Power" and "Always Save Power". Where as "Auto Save Power" apps are killed after three days, but what is meant by "Always Save Power"? On what basis they are categorise?

There is not much information available online. I tried using alarm manager to wake the service after 73 hours, the alarm did go on, but service got killed after few moments. Also when the service is killed none of service life methods were called ( onDestroy or onTaskRemoved).

kaibuki
  • 16,208
  • 34
  • 75
  • 111
  • 1
    This isn't the first time [this](http://stackoverflow.com/questions/36094927/dealing-with-samsung-spcm-killer) has been [asked](http://stackoverflow.com/questions/36850109/samsung-app-optimisation-feature-kills-background-applications-after-3-days). – Mike M. May 30 '16 at 06:19
  • @MikeM. Visited the both links you provided, but they have no solid implementable answer, that is the reason I posted my own question. – kaibuki May 30 '16 at 06:55
  • I was pointing out that there doesn't seem to be an acceptable solution yet. That doesn't really mean, though, that you should just post another repeat question. – Mike M. May 30 '16 at 07:02

0 Answers0