Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To transfer file from pc to android device via usb

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?

like image 232
BhagyaNivi Avatar asked Feb 28 '13 07:02

BhagyaNivi


People also ask

What is the fastest way to transfer files from Windows to Android?

Sending files from your PC to Android via a sharing Wi-Fi network is the most efficient method. You can do this using a variety of applications, including Wi-Fi File Transfer for Android. Run the application, search, copy, and paste into the directories on the other device.

Why USB file transfer is not working?

Fix 1: Check the USB Port and Cable. Fix 2: Allow USB Debugging. Fix 3: Enable File Transfers on Your Android Phone. Fix 4: Update Android OS to the Latest Version.


1 Answers

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.

like image 82
user370305 Avatar answered Oct 21 '22 07:10

user370305