android is my application still running?
<p>i have this thread which run as a service:</p>

<pre><code>    public void run() {
        try {
            while(true) {
                Thread.sleep(timeInterval);
                results = sendGetMessage();
                b.putString("results", results);
                receiver.send(2, b);
            }
        } catch (InterruptedException e) {
            results = e.toString();
        }
    this.stop();
    }
</code></pre>

<p>i want to write a simple function which will check if my application is still running (in order to replace the everlasting while(ture) i've written).
something like: while(isMyAppRunning).
my problem now that even when i'm closing the app, the service keep on running..
can someone please be kind and give me a code example?</p>
