Keep background service running after killing an application
I have developed an android application which runs background service, I need the service to stay alive even if the application is killed by user or for some reason. I have implemented the service and add return START_STICKY in onStartCommand method like this: public int onStartCommand(Intent intent, int flags, int startId) { super.onStartCommand(intent, flags, startId); Log.d("my_state","On start command"); return START_STICKY; } also I defined the service in AndroidManifest.xml like this: <service android:name=".MeterDistanceCalcService" android:exported="true" android:enabled="true" android