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);
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非常了解安全性,并且在没有用户交互的情况下不会启用此设置。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.