I hoping this was fixed along the way and the issue not updated. I had to
drop a part of an internal application for a company because of this bug.
And like lbendlin said, you could just check the last known and see if it
was recent enough to use.
private static final int TIME_WINDOW = 10000; // 10 Second window
LocationManager lmMgr = (LocationManager)getSystemService(
Context.LOCATION_SERVICE );
Location lLast = lmMgr.getLastKnownLocation( LocationManager.GPS_PROVIDER );
if( System.currentTimeMillis() - lLast.getTime() < TIME_WINDOW )
{
// Use last known.
}
You can always do this first and if something else is using the GPS you
could get a good fix fairly quickly. Just know that this can be VERY old
and you would want to do proper checking on it.
Steven
Studio LFP
http://www.studio-lfp.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en