Open GoogleCodeExporter opened 9 years ago
It seems that for Fused Provider, timeout is never handled. This works for me
<code>
public boolean forceLocationUpdate() {
..........
if (LocationLibraryConstants.SUPPORTS_GINGERBREAD) {
if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()) == ConnectionResult.SUCCESS) {
if (LocationLibrary.showDebugOutput) Log.d(LocationLibraryConstants.TAG, TAG + ": Force a single location update using Google GMS Location, as current location is beyond the oldest location permitted");
mLocationClient.connect(); // this will cause an onConnected() or onConnectionFailed() callback
//TODO: Find better solution. Force Stop Service after 5 minutes.
new Timer().schedule(new TimerTask(){
public void run(){
mLocationClient.disconnect();
stopSelf();
}}, 5 * 60000);
return true;
</code>
Original comment by kinshuk1...@gmail.com
on 1 Jan 2015 at 3:40
Original issue reported on code.google.com by
kinshuk1...@gmail.com
on 30 Dec 2014 at 10:57