有三个经纬度获取方式,LocationManager.GPS_PROVIDER,通过GPS获取,房间里用不了。
LocationManager.NETWORK_PROVIDER网络获取方式,必须要有网络才能获取。
LocationManager.PASSIVE_PROVIDER。这个是什么方式啊?谁能给我具体的把这三个获取位置的方式说说?

解决方案 »

  1.   

    A special location provider for receiving locations without actually initiating a location fix.This provider can be used to passively receive location updates when other applications or services request them without actually requesting the locations yourself. This provider will return locations generated by other providers. You can query the getProvider() method to determine the origin of the location update. Requires the permission ACCESS_FINE_LOCATION, although if the GPS is not enabled this provider might only return coarse fixes.Constant Value: "passive"