如何打开热点和网络共享设置屏幕,然后以编程方式打开安全弹出屏幕?

How to open Hotspot & tethering setting screen and after that open security popup screen programmatically?

这里我只想通过单击按钮打开热点和网络共享屏幕,以便用户可以手动创建热点。我搜索了很多但没有找到任何隐含的意图去那个屏幕。我还可以打开弹出窗口,用户可以在其中写入网络名称和安全详细信息吗?如果是,那么如何?

这应该有效:

final Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
final ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.TetherSettings");
intent.setComponent(cn);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

但可能取决于实际设备,三星、LG、索尼可能会有所不同。