如何解决“Android 2.3.4 中的 minTime 不起作用”问题错误
漫画...我已经在 android 1.6
和 2.3.3
中测试了一个非常简单的 GPS 位置...基本上是这样的:
LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
Location myLocation = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
lm.requestLocationUpdates( LocationManager.GPS_PROVIDER, 10000, 0, listener);
我已经在 [1.6和 2.3.3] 等待通知者 10 秒[在 onLocationChanged
... 处显示祝酒词...],但奇怪的是在 2.3.4
版本中android
它只是忽略 minTime
[不管它是 10000 还是 120000] 它一直在寻找变化......
有人遇到这个问题吗?也许不是 2.3.4 的问题,但其他人也有这个问题吗?
Comic... I've tested in an android 1.6
and 2.3.3
a very simple gps location... with basically this:
LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
Location myLocation = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
lm.requestLocationUpdates( LocationManager.GPS_PROVIDER, 10000, 0, listener);
I've tested in both [1.6 and 2.3.3] with the 10 seconds waiting for the notifiers [showing a toast at onLocationChanged
...], But strangely in an 2.3.4
version of android
it simply ignores the minTime
[does not matter if it is 10000 or 120000] it keep looking for changes all the time...
Anyone with this problem? Maybe it is not in the 2.3.4 the problem but anyone else had this problem too?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是按记录工作的。
minTime
是一个建议,而不是规则。引用文档:This is working as documented.
minTime
is a suggestion, not a rule. Quoting the documentation: