Enable USB Tethering Android Programmatically without user Interaction

爷,独闯天下 提交于 2020-01-03 03:37:07

问题


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?


回答1:


No, Android is very security-aware and will not enable this setting without user interaction.



来源:https://stackoverflow.com/questions/14340084/enable-usb-tethering-android-programmatically-without-user-interaction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!