更新时间:2022-11-26 16:40:32
在您的应用中实现 HTTP 服务器,然后将手机置于 USB Tether 模式.这将在您的手机和 PC 之间创建一个本地网络.然后,您应该能够使用手机的 ip 发送 HTTP 请求或创建 websocket.
Implement a HTTP server in your app, then put your phone in USB Tether mode. This will create a local network between your phone and your PC. You should then be able to send HTTP request or create websockets using the phone's ip.
我对其进行了测试,它可以工作,请参阅 这里
EDIT : I tested it, and it works, see here