我正在一個Android應用程序中嘗試建立Android設備和運行在Windows操作系統上的機器之間的通信。我想使用USB從android設備傳輸一些字節到該機器。如何在Android設備和通過USB在Windows上運行的機器進行通信
我相信在windows操作系統上運行的機器總是充當主機。正確嗎?
我看到Android有兩個API的
- https://developer.android.com/guide/topics/connectivity/usb/accessory.html
- https://developer.android.com/guide/topics/connectivity/usb/host.html
任何人都可以建議我該API會爲我工作嗎?
爲什麼不使用Android shell? –
@AlexT。我想通過一個應用程序來完成,所以我需要編寫一個應用程序 –