编程激活GPSGPS

2023-09-06 19:32:56 作者:傻不拉几

我的应用程序需要的GPS要上,有没有什么办法来检查GPS是否当前已启用或没有,如果没有,那么如何实现。 我使用的是Android 2.3

My application needs the GPS to be on, is there any way to check whether GPS is currently enabled or not and if not , then how to enable. I am using android 2.3

推荐答案

安卓不允许你这样做。你能做的最好的事情,如果GPS的启用是检查,如果它不是,要求用户激活它。

Android does not allow you to do that. The best thing you can do is checking if the GPS is enabled and if it's not, ask the user to activate it.

在这里,您可以看到如何知道如果GPS启用:How我发现,如果一个Android设备的GPS启用

Here you can see how to know if the GPS is enabled: How do I find out if the GPS of an Android device is enabled

 
精彩推荐
图片推荐