Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/221.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
以编程方式启用USB连接Android,无需用户交互_Android_Tethering - Fatal编程技术网

以编程方式启用USB连接Android,无需用户交互

以编程方式启用USB连接Android,无需用户交互,android,tethering,Android,Tethering,我正在开发一个需要USB连接的应用程序 我正在使用下面的代码来执行此操作 Intent tetherSettings = new Intent(); tetherSettings.setClassName("com.android.settings", "com.android.settings.TetherSettings"); startActivity(tetherSettings); 但此代码正在打开栓系设置,以便用户可以通过单击它来启用USB栓系。是否

我正在开发一个需要USB连接的应用程序

我正在使用下面的代码来执行此操作

Intent tetherSettings = new Intent();
        tetherSettings.setClassName("com.android.settings", "com.android.settings.TetherSettings");
        startActivity(tetherSettings);

但此代码正在打开栓系设置,以便用户可以通过单击它来启用USB栓系。是否可以在没有任何用户交互的情况下启用栓系?

否,Android非常安全,在没有用户交互的情况下不会启用此设置。

否,Android非常安全,在没有用户交互的情况下不会启用此设置