如何监听来自多个供应商的位置更新?多个、供应商、位置

2023-09-06 06:24:13 作者:白衣牛仔少年

在此code我请求GPS位置更新

In this code I request location updates from GPS

locMan.requestLocationUpdates(LocationManager.GPS_PROVIDER,20000, 1, gpsListener);

但我怎么能确定它监听WiFi或手机ID更新呢?

But how can I make sure it listens for Wifi or Cell ID updates too?

推荐答案

您应该能够调用 requestLocationUpdates(),具有鲜明的 LocationListener的对象,其他的供应商。

You should be able to call requestLocationUpdates(), with distinct LocationListener objects, for the other providers.