Android的GPS和电池使用 [英] Android GPS and battery usage

查看:187
本文介绍了Android的GPS和电池使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个Android应用程序A和B,两者都基于不同的参数读取GPS值。考虑到这两个应用程序在设备,其中folllowing方法的效果会更好上运行?

I have 2 android applications A and B, and both of them are reading gps values based on different parameters. Considering both the apps are running on the device, which of the folllowing approaches would be better?


  1. A和B是有所不同的应用程序,每一个从GPS读取组件。

  1. Both A and B are to be different apps, each one with a component to read from GPS.

要开发具有远程服务分量的第三应用GPS数据传输到A和B

To develop a third application with a remote service component to transmit GPS data to both A and B

应该电池的使用由去为第二个方法或将读取GPS组件一次,为所有流程,如OS最小化?

Would battery usage be minimized by going for the second approach or will the GPS component read once and serve all processes, as in the OS?

请帮忙

推荐答案

有在的 Android开发者网站了解定位策略。我建议你​​看看页面上的code的例子。

There is a very good explanation given in the Android Developers Website about Location Strategies. I would suggest you to take a look at the code examples on the page.

在您的两个方法,我相信第二个方法是,因为打开/关闭GPS在电池使用方面相当昂贵的操作相当好。

In both of your approaches i believe second approach is quite better because Turning on/off GPS is a quite expensive operation in terms of battery usage.

GPS的电池耗尽行为是最初的收购卫星导航消息的过程中最明显。获得每个卫星需要12至30秒,但如果需要的完整星历,这可能需要多达12分钟。在这一切,你的手机无法进入深度睡眠。 A-GPS(辅助全球定位系统),部分解决了这一点,在你的蜂窝数据网络,甚至无线网络发送的导航消息到您的移动设备。作为上述任一带宽大大矮人GPS卫星的50个基点,所花费的时间的GPS天线供电或避免深睡眠大大降低。

GPS’s battery draining behavior is most noticeable during the initial acquisition of the satellite’s navigation message. Acquiring each satellite takes 12 to 30 seconds, but if the full almanac is needed, this can take up to 12 minutes. During all of this, your phone is unable to enter a deep sleep. A-GPS (Assisted GPS) partially solves this, by sending the navigational message to your mobile device over your cellular data network or even Wi-Fi. As the bandwidth of either of these greatly dwarves the 50bps of the GPS satellites, the time spent powering the GPS antenna or avoiding deep sleep is greatly reduced.

从<一提到href=\"http://www.forbes.com/sites/quora/2013/08/06/why-does-gps-use-more-battery-than-any-other-antenna-or-sensor-in-a-smartphone/\"相对=nofollow>这个。

这篇关于Android的GPS和电池使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆