Android 谷歌地理定位是否仅在移动时向服务器发出请求?

Android 谷歌地理定位是否仅在移动时向服务器发出请求?,android,geolocation,maps,Android,Geolocation,Maps,有人知道google地理定位功能/api是否会向服务器发出实际请求,即使它检测到您并没有移动?例如,如果wifi热点和它们的优势自上一个位置以来没有改变,他们可以假设你没有移动,所以没有必要去谷歌的服务器!客户机中是否有这种逻辑性能? 我对安卓谷歌地图api更感兴趣 谢谢 比这更好:网络位置API在手机上缓存数据,因此即使您移动手机,也可能不需要发出请求 在我的Nexus One上看到的日志示例: D/androidNlpServiceThread( 194): adding listener

有人知道google地理定位功能/api是否会向服务器发出实际请求,即使它检测到您并没有移动?例如,如果wifi热点和它们的优势自上一个位置以来没有改变,他们可以假设你没有移动,所以没有必要去谷歌的服务器!客户机中是否有这种逻辑性能? 我对安卓谷歌地图api更感兴趣


谢谢

比这更好:网络位置API在手机上缓存数据,因此即使您移动手机,也可能不需要发出请求

在我的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

据我所见,客户端向谷歌地理定位api发送您自己的mac地址和附近wifi热点的mac地址和SID,以及它们的信号强度;有了这些信息,谷歌的回复就包含了你的估计坐标及其准确性。那么安卓手机缓存中到底有哪些数据?根据你的说法,android用来决定是使用缓存数据还是再次查询google服务器的标准是什么?它缓存了你周围热点的BSSID,因此可以在本地查询,而无需访问服务器。如果有太多的“未命中”,它将转到服务器。你可以在诸如NexusOne等HTC手机的日志中看到它。我已将日志添加到原始答案中。如果这令人满意,请指定答案。如果没有,请告诉我原因。很抱歉延迟回复。谢谢你的回答。这就是我要找的!