Ragunath Jawahar
Ragunath Jawahar

Reputation: 19733

Check the state of a local Service

How do I check whether the local service inside my application is running?

Upvotes: 1

Views: 470

Answers (2)

Robert
Robert

Reputation: 568

This doesn't make sense to me... what if you have a toggle button for starting/stopping the service. When your home screen loads, how do you know if the toggle button should be displaying ON or OFF? Let's say you go into the app, toggle the service on. Then later you come back into the app. How does the app know that the toggle button should be set to on?

Upvotes: 1

CommonsWare
CommonsWare

Reputation: 1007124

You don't. You just start it or bind to it as needed.

Upvotes: 1

Related Questions