Make service indepented from activity (Android).
Posted
by shuwo
on Stack Overflow
See other posts from Stack Overflow
or by shuwo
Published on 2010-03-28T19:34:29Z
Indexed on
2010/03/28
19:43 UTC
Read the original article
Hit count: 156
I have an activity with two buttons, start and stop. If the user press the start button a service is created using Context.startService. And the stop button calls Context.stopService.
I want the stop button to be the only way to destroy the service. Now, if i end the activity using a task manager, the service is killed as well. Is there any way to avoid this?
© Stack Overflow or respective owner