How to test to see if GPS is working in Android App?
<p>I would like to be able to test to see if the Phone's GPS is working or not (in the app's code). Right now, I am just trying to directly access the GPS location without an  </p>

<pre><code>if ( GPS_is_working ) {

}
</code></pre>

<p>I am having a problem right now since when I access the GPS when it is not working, the force-close dialogue shows up and my activity is shut down.</p>

<p>What is the code to do this?</p>
