amansatija / android-protips-location

Automatically exported from code.google.com/p/android-protips-location
0 stars 0 forks source link

Sometime requestSingleUpdate not work when mobile access wifi (make sure that it can connnect internet) #17

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

    // If the best result is beyond the allowed time limit, or the accuracy of the
    // best result is wider than the acceptable maximum distance, request a single update.
    // This check simply implements the same conditions we set when requesting regular
    // location updates every [minTime] and [minDistance]. 
    if (locationListener != null && (bestTime < minTime || bestAccuracy > minDistance)) { 
      IntentFilter locIntentFilter = new IntentFilter(SINGLE_LOCATION_UPDATE_ACTION);
      context.registerReceiver(singleUpdateReceiver, locIntentFilter);      
      locationManager.requestSingleUpdate(criteria, singleUpatePI);
    }

90% requestSingleUpdate ,when system get location will will send intent to 
BroadcastReceiver singleUpdateReceiver 

Sometime I see requestSingleUpdate not work.It make my application can not get 
location.But I test GooglePlace ,it can get location

What version of the product I'm using 4.1 

I 'm not understand why GooglePlace can get very good location

Original issue reported on code.google.com by playerth...@gmail.com on 5 Dec 2012 at 4:41

GoogleCodeExporter commented 9 years ago
I also have the same issue. If I have restarted my phone and there is no 
previous location, on Wifi I don't get single update. Any solutions?

Original comment by vermasum...@gmail.com on 9 Jun 2013 at 5:41