Android service stops when the activity finishes.

14 views
Skip to first unread message

Ashish

unread,
Nov 30, 2014, 5:29:23 AM11/30/14
to androi...@googlegroups.com
In my application i start an service from a activity using startService command. This service is used for uploading file so it will take time.
So what i want is my Activity should be finished and srvice should keep on doing its work. For this purpose after calling startService() i call the activity finish also.
Because of this my service stops in between abruptly while if i dont call finish of activity everytihng works fine. I want to know how to make it possible so that service keep doing its work while Activity (who started this service) is finished.

Thanks in advance for help.

Reply all
Reply to author
Forward
0 new messages