以编程方式启用USB网络共享Android,无需用户交互
问题描述:
我正在开发需要USB网络共享的应用程序.
I am developing an application that requires USB Tethering.
我正在使用以下代码这样做
I am using the following code to do so
Intent tetherSettings = new Intent();
tetherSettings.setClassName("com.android.settings", "com.android.settings.TetherSettings");
startActivity(tetherSettings);
但是此代码正在打开网络共享设置",因此用户可以通过单击来启用USB网络共享.是否可以在没有任何用户交互的情况下启用网络共享?
But this code is opening the Tethering Setting so the user can Enable the USB tethering by clicking on it. Is it possible to enable the tethering without any user interaction?
答
否,Android非常安全,因此在没有用户交互的情况下不会启用此设置.
No, Android is very security-aware and will not enable this setting without user interaction.