[Code block] Jump to the network setting interface (WIFI and LAN)

Jump to the network setting interface (including wifi and lan)

/**
* 显示网络设置界面
*/
private void showNetworkActivity() {
    
    
   ComponentName componentName = new ComponentName("com.android.tv.settings", "com.android.tv.settings.connectivity.NetworkActivity");
   Intent intent = new Intent();
   intent.setComponent(componentName);
   intent.setAction("android.intent.action.View");
   startActivity(intent);
}

Jump directly to the LAN port IP settings (root privileges are required)

  • Use the adb command execRootCmd [Portal]
execRootCmd("am start com.android.tv.settings/.connectivity.EditIpSettingsActivity");

Guess you like

Origin blog.csdn.net/qq_36881363/article/details/109990531