如何启用GPS的设置自动 [英] How to enable the GPS setting automatic

查看:81
本文介绍了如何启用GPS的设置自动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  启用GPS编程喜欢塔斯克

有人知道如何启用GPS设置自动?看来 切换设置应用程序可以处理它,但我想逼我的应用程序SDK 2.1开放。 有人说

Anybody know how to enable the GPS setting automatic? Seems the "Toggle Settings" app can handle it, but I want to force open in my app sdk 2.1. some people said

 "Method m =locationManager.getClass().getMethod("updateProviders", new Class[] {});
                m.setAccessible(true);
                m.invoke(locationManager, new Object[]{});"

但在SDK2.1 locationManager类DONOT有updateProviders。 couled你能给我一些指示或code?

but in sdk2.1 locationManager class donot have updateProviders. couled you give me some directions or code?

请帮助我,如果你有时间。

Please help me if you have time.

推荐答案

普通的SDK应用程序不能改变启用状态的GPS。只有那些通过固件签名密钥签名可以通过 Settings.Secure 做到这一点。

Ordinary SDK applications cannot change the GPS enabled state. Only those signed by the firmware signing key can do this, via Settings.Secure.

这篇关于如何启用GPS的设置自动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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