【发布时间】:2013-08-01 16:43:08
【问题描述】:
我正在通过网络获取纬度和经度
它给了我纬度和经度,但是如果我的NETWORK LOCATION PROVIDER 未被选中会怎样
它永远不会向我提供当前位置的纬度和经度。
我想要的是,如何在不知道的情况下在手机中启用NETWORK LOCATION PROVIDER
打开它的用户,
我该怎么做?
我试过的是:
Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivityForResult(intent, 1);
But this will open the page in my phone to check it i want to check AUTOMATICALLY
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.android.phone", "com.android.phone.Settings");
startActivity(intent);
【问题讨论】:
-
两个答案都是正确的:出于设计和明显的安全原因,您不能仅从应用程序中移动这样的系统设置。
标签: android