Getting null from 'getLastKnownLocation' on SDK
<p>I have a problem related to the Location API.</p>

<p>I tried the following code:</p>

<pre><code>LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
Location loc = getLastKnownLocation(LocationManager.GPS_PROVIDER);
</code></pre>

<p><code>loc</code> is always <code>null</code>, when <code>getLastKnownLocation()</code> is called.</p>

<p>What is wrong?</p>
