I had a Singleton object that had a bound service. I wanted it to restart, and when I start my application from launcher, singleton object will initialize and bind to this exist
As you are returning START_STICKY
this service will stop whenever you close/kill the app because after the App closed all the Reference/Value will become null
for all Intent as well as variables and so STICKY
service will not able to get Intent value. if you want to restart the service after app kills use return START_REDELIVER_INTENT
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
return START_REDELIVER_INTENT;
}
this will restart the service in 5-10 seconds after app killed.