can i use isFinishing() from a service?
<p>I want to know if my app closing legitimately or from a crash.   When my app starts it sets an alarm which when triggered starts a service.   I cant work out how to code the isFinishing() from the service .  I tried :-</p>

<pre><code>if (!((Activity) getBaseContext()).isFinishing())
</code></pre>

<p>this compiled ok but when run gave the following error:-</p>

<pre><code>java.lang.ClassCastException: android.app.ContextImpl
</code></pre>

<p>Is there a way to call from a service?
Ron</p>
