I actually had this when developing my app recently.
The trick is to start the Service
on its own and then bind to it using the Intent
. When you unbind from it, the Service
will still continue running.
Intent i = new Intent(this, DataService.class);
startService(i);
bindService(i, this, Context.BIND_AUTO_CREATE);