Android的位置监听器监听器、位置、Android

由网友(你的微笑慌乱了我整个青春)分享简介:我想聆听来自同一个侦听和实施i want to listen to both GPS and NETWORK location provider from the same listener and implementation这是正确的这样做:locationManager.requestLocationUpda...

我想聆听来自同一个侦听和实施

i want to listen to both GPS and NETWORK location provider from the same listener and implementation

这是正确的这样做:

        locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,metersToUpdate,this);
        locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,0,metersToUpdate,this);

将它的用户同样的方法为供应商?

will it user the same methods for both providers ?

推荐答案

谷歌称这里:

您也可以要求从两个GPS,并通过调用requestLocationUpdates(网络位置提供位置更新)两次,一次NETWORK_PROVIDER和一次GPS_PROVIDER。

You can also request location updates from both the GPS and the Network Location Provider by calling requestLocationUpdates() twice—once for NETWORK_PROVIDER and once for GPS_PROVIDER.

阅读全文

相关推荐

最新文章