I have an app that has a client Activity and a long-running Service. The Service may be started by the alarm manager or by the Activity itself.
The alarm intent calls startService(). The Activity calls startService, and then binds itself to the service so it can get information from it.
When I back-button out of the Activity, onDestroy() is called on the Activity, the Activity unbinds from the Service, and onDestroy() is called on the Service.
I was under the impression that if I called startService(), then the Service would stay around until stopService()/stopSelf() was called, no matter what clients have unbound from it.
Am I misunderstanding something?