尝试首次定位时 Android GPS 是否会耗尽电池电量?
我注意到我的 HTC Desire S Android 手机上有一些奇怪的地方:如果 GPS 无法修复,通知栏中的 GPS 图标会整天闪烁。即使我强行停止所有使用 GPS 的应用程序,图标也会继续闪烁。
闪烁表示尚未修复。 GPS 似乎一直在尝试获得首次定位。如果我在初始修复期间无法关闭 GPS,它是否仍会像修复后一样耗尽电池电量?
I noticed something odd on my HTC Desire S Android phone: If the GPS cannot get a fix the GPS icon in the notification bar stays blinking the whole day. Even if I force stop all applications using the GPS the icon keeps on blinking.
Blinking means that it hasn't gotten a fix. It seems like the GPS is continuously trying to get that first fix. If I cannot shut off the GPS during initial fix, does it still drain the battery as if it had a fix?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用removeUpdates()方法在应用程序中取消注册LocationListener。你一定忘记了这一点。
unregistered the LocationListener in your application using removeUpdates() method . you must have forgot this.
假设您已取消注册所有位置侦听器;这是我以前见过的一个已知问题。如果没有日志,真的很难说发生了什么。可能有两种可能性:
更可能的一种:状态栏上的停止 GPS 闪烁图标通知不知何故丢失了。我以前见过这个错误(每 500 次运行一次)。在这种情况下,GPS 已停止,这是 StatusBarPolicy.java 或 GpsLocationProvider.java 。 GPS_FIX_CHANGE_ACTION 的意图不知何故被错过了。 更有可能的是
GPS 实际运行的情况很少,这可能是由于 HTC 使用的 GPS 芯片组存在缺陷
Assuming you have unregistered all of the location listener; This is a known problem I've seen it before. It is really hard to say what happened without logs. There could be two possibilities :
More likely one: The stop GPS blinking icon notification to the status bar somehow got lost. I've seen this bug before (once in 500 runs). In this case, GPS has beed stopped, It is a bug in StatusBarPolicy.java or GpsLocationProvider.java . The intent GPS_FIX_CHANGE_ACTION is somehow missed.
It is a rare case that GPS is actually running, that may be due to a defect in the GPS chipset used in HTC