<分区>
Possible Duplicate:
Enable GPS programatically like Tasker
有人知道如何启用 GPS 自动设置吗?似乎 “切换设置”应用程序可以处理它,但我想在我的应用程序 sdk 2.1 中强制打开。 有人说
"Method m =locationManager.getClass().getMethod("updateProviders", new Class[] {});
m.setAccessible(true);
m.invoke(locationManager, new Object[]{});"
但是在 sdk2.1 locationManager 类中没有 updateProviders。 你能给我一些指示或代码吗?
如果你有时间请帮帮我。