Reputation: 434
Does anyone know if google geolocation feature/api makes an actual request to server even when it detectes you haven't moved ? For instance, if wifi hotspots and their strengths didn't change since last location they can assume you haven't moved so there's no need to go to google 's server ! Do they have this kind of logic performance in the client ? I'm more interested on Android google maps api.
Thanks !
Upvotes: 0
Views: 541
Reputation: 1876
Better than that : the network location API caches data on your phone so even if you move it may not need to make a request.
Example of the logs seen on my Nexus One:
D/androidNlpServiceThread( 194): adding listener com.google.android.location.internal.client.NetworkLocationClient$1@405575e8 with period 45
D/androidNetworkLocationListeners( 194): Still have listener com.google.android.location.internal.client.NetworkLocationClient$1@405575e8
D/androidNlpServiceThread( 194): adding listener com.google.android.location.internal.client.NetworkLocationClient$1@405575e8 with period 45
D/androidNetworkLocationListeners( 194): Still have listener com.google.android.location.internal.client.NetworkLocationClient$1@405575e8
D/WifiLocator( 194): Good cache hits. Computing WiFi location locally hasLocation=4 noLocation=0 cacheMiss=0
D/WifiLocator( 194): Computing location using MaxLre.
D/WifiLocator( 194): Finished computing WiFi location: WifiLocationResult [position=Position [redacted], confidence=78, outliers=[]]
D/CellLocator( 194): Found cell location: Position [redacted]
D/androidNlpServiceThread( 194): reporting Location[mProvider=network,mTime=1340791812841,mLatitude=****,mLongitude=****,mHasAltitude=false,mAltitude=0.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0,mHasAccuracy=true,mAccuracy=42.0,mExtras=Bundle[{networkLocationSource=cached, networkLocationType=wifi}]]
D/ClientReporter( 194): reported location
Upvotes: 1