永发信息网

怎么连接 android usb tethering

答案:2  悬赏:40  手机版
解决时间 2021-03-19 08:36
  • 提问者网友:姑娘长的好罪过
  • 2021-03-18 17:37
怎么连接 android usb tethering
最佳答案
  • 五星知识达人网友:刀戟声无边
  • 2021-03-18 18:58
public int setUsbTethering(boolean enable) {
if (VDBG) Log.d(TAG, "setUsbTethering(" + enable + ")");
UsbManager usbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE);

synchronized (mPublicSync) {
if (enable) {
if (mRndisEnabled) {
tetherUsb(true);
} else {
mUsbTetherRequested = true;
usbManager.setCurrentFunction(UsbManager.USB_FUNCTION_RNDIS, false);//一开始因为rndis还没有enable,所以会先设置function
}
} else {
tetherUsb(false);
if (mRndisEnabled) {
usbManager.setCurrentFunction(null, false);
}
mUsbTetherRequested = false;
}
}
return ConnectivityManager.TETHER_ERROR_NO_ERROR;
}
全部回答
  • 1楼网友:怀裏藏嬌
  • 2021-03-18 19:50
我的和你的一样,有时能刷新,有时候不能刷新到设备。今晚折腾了好久,刚才都能上网,虽然偶尔会掉线。但现在一点都无法刷新出来了。重启手机,重新处理手机中的软件。将电脑中软件在任务管理器中干掉。还是无法刷新。实在无法。将电脑任务管理器打开,把adb.exe结束任务。再刷新,呵呵。一下就能刷新出设备了。然后嘛,手机就能上网了。在软件的工具中,有个干掉adb.exe功能。仔细看看。
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯