How to access Android File system from Windows 8 .NET application

M Michael Goosse 3 years 6 months ago
4 2 0

Hello, I would like to know what's the best way to use to exchange file between a windows 8 computer and an android device ? I will have to generate XML file on the computer side, send it to my device (using an usb connection), update the file on the device, and then send it back to my computer. My computer application will be written in .NET

Please Register or Login to post a reply

2 Replies

Y Yanis Dalabiras

Michael, here is some sample code to use the .NET Process API to make adb.exe  push/pull files.

Process p = new Process ();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = ;

p.StartInfo.Arguments = "push   ";  //push file to device
or
p.StartInfo.Arguments = "pull ";  //pull file from device

p.Start ();
string standardOut = p.StandardOutput.ReadToEnd ();
p.WaitForExit ();

Y Yanis Dalabiras

Michael,
I would use the .NET Process API to run the ADB commands  "push" and "pull" to place files on the device and copy them back to the pc.

CONTACT
Can’t find what you’re looking for?