0

I built an application where I need to do some queued up work periodically. I was using JobScheduler to run a periodic job, but I have several problems with it (smartmanager of samsung disables it, sometimes not running for a long time...)

For explanation: The user interacts with the app (click a button, take a photo...) and the app queues it in a sqlite database. The JobScheduler is here to upload it periodically to our servers.

What is the best practice to achieve this?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Tommehh
  • 872
  • 1
  • 17
  • 44
  • Did you try to whitelist your app? – Debdeep Feb 02 '18 at 07:52
  • that works, but it's a company app and i can't control over 100 devices. if an employee enables it, i can't know – Tommehh Feb 02 '18 at 07:52
  • A foreground notification is useful in some cases. AlarmManager is also prevented from killing but it's a different use case. – Debdeep Feb 02 '18 at 07:56
  • It's not so easy for our employees to whitelist it. So a notification does not help either. – Tommehh Feb 02 '18 at 08:01
  • Processes SmartManager covers Samsung and few other devices. Also, people may or may not choose to enable it. – Debdeep Feb 02 '18 at 08:04
  • Here's a useful thread I would like to share it with you. https://stackoverflow.com/questions/37205106/how-do-i-avoid-that-my-app-enters-optimization-on-samsung-devices – Debdeep Feb 02 '18 at 08:05
  • 1
    If you can check If the smart manager is installed on the device and respectively display a nice little suggestive message to turn it off in order to provide best services, I think that would be helpful. – Debdeep Feb 02 '18 at 08:09

0 Answers0