Is there any way to set the priority of android service? I want to run the service in background after destroying App's main actvity. So i am returning "START_REDELIVERY_INTENT" from my service. But restarting of service is taking some time (around 1-3 minutes). I want to restart the service instantly. Is there any way to set the priority of android service.
FYI, I am creating service using startService and passing an object through intent.putExtra().
Below snapshot is taken from setting/apps/running apps by my android device, which shows that app is restarting... My app is real time specific, so i want to restart it instantly...

You cannot control this behavior of Service as it depends on the OS and available resources. However, for a continuously running background service, I would suggest you to return START_STICKY - which tries its best to re-run the service once its destroyed due to any reasons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With