I have a bounded service S (seperate process) which gets started when the boot is complete. I have an application A which binds to the service when the application is launched.
Now my question is when I force stop the application in settings the service S which is in different process also gets destroyed.
Ideally only the application process should have been killed but the service should have kept running. Why is the service S getting killed even if it is in different process.
I have a bounded service S (seperate process) which gets started when the boot
Share
Bound services always stop when the
Activitythat calledbindService()is destroyed. In order to prevent this from happening you must do the following:START_STICKYfrom theonStartCommand()method within your service.startService()before callingbindService()from yourActivity.