Is my Service running

Put your problem here if it does not fit any of the other categories.

Is my Service running

Postby tsucheck » Thu Feb 21, 2008 4:40 am


Does any one happen to know the answer to the following please. You have an activity that starts a service using startService (so a service that should live long). Now user exits the activity. Service should still be running. Then restart the activity. Now without binding to the service the Activity can send requests to it to do all sort of work using startService. I would prefer not binding to the service unless I have to. The question... is there a way for the Activity to determine that the service is already running when the Activity is restarted. All the methods that I've seen seem to create the service if its not there or just return if its there, so there is no indication weather it was created or just found. In fact I would like to only find out if its running already and not necessarly create it.

Thanks in advance.

Posts: 29
Joined: Sun Feb 17, 2008 2:07 am


Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 3 guests