当我启动系统意图时,Android设备打开错误的设置页面。我试图用下面的代码打开数据漫游设置页面,但设备打开了数据漫游选项不存在的设置页面。当我启动系统意图时,设备打开错误的设置页面
if (bv < Build.VERSION_CODES.JELLY_BEAN) {
Intent intent = new Intent(Settings.ACTION_DATA_ROAMING_SETTINGS);
ComponentName cName = new ComponentName("com.android.phone", "com.android.phone.Settings");
intent.setComponent(cName);
startActivity(intent);
} else {
Intent intent = new Intent();
intent.setAction(android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS);
startActivity(intent);
}
Intent intent = new Intent(Intent.ACTION_MAIN); intent.setClassName(“com.android.phone”,“com.android.phone.NetworkSetting”); startActivity(intent); – Meenal
使用此意图只需将设置更改为网络设置 – Meenal