To transfer file from pc to android device via usb

≡放荡痞女 提交于 2019-11-29 21:09:17

问题


I want to transfer a file from my pc's particular port to android device over USB programmatically. Which technique is best for this mode of transfer among the following :

  1. Sockets
  2. HttpUrlConnection.

If it is possible through HttpUrlConnection means how to implement this?


回答1:


To transfer file from pc to android device via USB Socket Communication is best approach.

You have to do some additional step of port forwarding on which the Socket Communication establish.

Look at Tutorial https://github.com/user370305/Android-USB-Communication.



来源:https://stackoverflow.com/questions/15129437/to-transfer-file-from-pc-to-android-device-via-usb

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