如果我没有在requestLocationUpdates()中定义任何时间和距离,会发生什么?

时间:2011-05-12 11:39:06

标签: android locationmanager

如果我不能通过这种方法的最小时间和距离,会发生什么?这个方法何时会被调用?

locationManager.requestLocationUpdates(provider,0, 0,locationListener);

1 个答案:

答案 0 :(得分:2)

通过将minTime和minDistance设置为0,您将获得一部死电话。

by the docs:

  

要   经常获取通知   可能,将两个参数都设置为0。

你只会得到非常快速的反应,并且设备上的电池耗尽也是可怕的。