如何打开Android上GPSAndroid、GPS

2023-09-13 23:52:23 作者:认真生活,就可以找到生活藏起来的糖果哦,下面小编为您设计一些

我开发一个Android应用程序,需要激活GPS。

I am developing an android app which needs to activate the GPS.

我在很多论坛上阅读了很多话题,我已经找到了答案是:

I read a lot of topics in a lot of forums and the answer I've found is:

这是不可能的。

不过......在地狱犬的APP打开我的GPS ...所以... ...这是可能的!

But... the "Cerberus" APP turns my GPS on... so... it's possible!

谁能帮助我?

推荐答案

没有it't是不可能的,不适当的。你不能只是管理用户手机没有他的权威。

No it't impossible, and inappropriate. You can't just manage the users phone without his authority.

从Play商店:

地狱犬自动开启GPS,如果它是关闭的,当你试图定位设备的(仅在Android< 2.3.3),并可以防止未经授权的卸载 - 在应用程序的详细信息配置。

"Cerberus automatically enables GPS if it is off when you try to localize your device (only on Android < 2.3.3) and you can protect it from unauthorized uninstalling - more info in the app configuration."

您可以做这样的事情:

startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));