强制GPS来的 [英] Force GPS to come on

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

问题描述

我问这个问题(为什么地图标记突然倾斜周围的地图)昨天。有一件事我今天注意到的是,对于使用的LocationManager活动,但没有地图,我得到在状态栏中的图标GPS(菜的SATAlite喜气洋洋的信号了)。与具有地图碎片,也是活动使用的LocationManager我没有得到托盘中的图标GPS。我复制并粘贴位置管理code从一个活动到另一个。

I asked this question (Why Does Map Marker Lurch Around The Map) yesterday. One thing I noticed today is that for an activity that uses LocationManager, but not a map I get the GPS icon (satalite dish beaming signals up) in the status tray. With the activity that has a map fragment and also uses LocationManager I do not get the GPS icon in the tray. I copied and pasted the location manager code from one activity to the other.

为什么会来的GPS一些时间,而不是别人?

Why would the GPS come on some times and not others?

格雷格

推荐答案

这取决于全球GPS设置 - 如果它是在全球范围内,在活动\\片段使用的LocationManager会火卫星天线。如果GPS在全球范围内关闭 - 使用的LocationManager不会触发

It depend on global GPS setting - if it's globally on, using LocationManager in your Activity\Fragment will fire "satellite dish". If GPS is globally switched off - using LocationManager will not fire.

原因是,GPS是一个巨大的动力消费主义,并允许它没有明确的用户决定改用它会非常迅速地耗尽设备的电池运行。

The reason is that GPS is a huge power consumerist, and allowing it to run without clear user decision to switch it on will drain the device battery extremely quickly.

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

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