1

I am building an application where I need a service which will never stop like android system services. I can make my service restarted by system using start_not_sticky but there is no guarantee that my service will never stop. Does anyone help regrading this issue.

Farhana Haque
  • 1,371
  • 14
  • 23

1 Answers1

0

Try running your service as Remote service. This runs as an independent application.

Also, use handlers to schedule the part of the service which needs to be run at regular intervals.

Vinay
  • 2,395
  • 3
  • 30
  • 35