是否有任何选项可以让我们从应用程序的 android 移动设置中的定位服务中打开对我的位置的访问?

Is there any option that we can turn on access to my location in Location Services in android mobile settings from application?

我想打开设置>>定位服务>>从application.Is访问我在移动设备中的位置,android对此有任何权限。

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

没有

最近 android 设备无权从正常应用程序更改系统设置。

http://developer.android.com/reference/android/provider/Settings.Secure.html

Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications.

您可以通过 IntentSettings.ACTION_* 将用户引导至特定设置 Activity 以自行更改设置,而不是直接更改设置。 http://developer.android.com/reference/android/provider/Settings.html

我在我的应用程序中使用它。如果设备定位服务是关闭的那么这个方法去设置你可以打开定位服务。

if (!locationmanager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
            buildAlertMessageNoGps();
        }

private void buildAlertMessageNoGps() {
        final AlertDialog.Builder builder = new AlertDialog.Builder(this);
        builder.setMessage(getString(R.string.gps_warning))
               .setCancelable(false)
               .setPositiveButton(getString(R.string.enable), new DialogInterface.OnClickListener() {
                   @Override
                public void onClick(final DialogInterface dialog, final int id) {
                       startActivity(new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS));
                   }
               })
               .setNegativeButton(getString(R.string.cancel), new DialogInterface.OnClickListener() {
                   @Override
                public void onClick(final DialogInterface dialog, final int id) {
                        dialog.cancel();
                   }
               });
        final AlertDialog alert = builder.create();
        alert.show();
    }

No, from application which are (not system apps) we cannot programmatically turn location service ON

我们只能向用户打开位置设置以手动打开设置