I have a series of 3 activities, and the 3rd activity binds (I'm using AIDL) to a Service. What I notice is, if I am on the 3rd activity and start the service, on clicking the back button (moving from 3rd activity to 2nd activity), the Service onDestroy() gets called, and the Service is stopped.
How can I ensure that the service runs even if the Activity is closed?
This is how I bind to the service in the 3rd activity's onCreate method:
this.bindService(new Intent(this,MyService.class), mConnection, Context.BIND_AUTO_CREATE);
Thanks Chris