<div class="post-text" itemprop="text">
<p>How do I check if a background service (on Android) is running?</p>
<p>I want an Android activity that toggles the state of the service -- it lets me turn it on if it is off and off if it is on.</p>
</div>
<p>转载于:https://stackoverflow.com/questions/600207/how-to-check-if-a-service-is-running-on-android</p>