以下代码是在三星设备中启动gps设置屏幕,但在htc设备中,它启动了设置的安全屏幕。如何编写代码以便它将独立于设备启动gps屏幕。请帮助有任何替代解决方案在android中启动gps设置屏幕
final ComponentName toLaunch = new ComponentName("com.android.settings","com.android.settings.SecuritySettings");
final Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setComponent(toLaunch);
startActivity(intent);
它worked.thanks – android
为我工作呢!谢谢。 –
为我工作,对于需要使用它的其他人: – eWizardII