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
How to access Android File system from Windows 8 .NET application |
2 Replies
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 ();
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.