You are on page 1of 2

moz-extension://de217b77-76e5-4c27-8c16-6966cb454992/algo.

html

stackoverflow.com/questions/17555911/read-write-to-a-samsung-android-phone-tablet-from-a-c-sharp-windows-app

I am writing a Windows C# (winforms) app that copies images from a PC to the Android device
Images folder. Windows file explorer gives me this path: Computer\SCH-I535\Phone\Images but I
cannot access the device programmatically via the path.

I am not sure how to mount or read the Android device from my C# app. I's sure this is dead-
simple, but I haven't had any luck.

Could anyone help?

asked Jul 9 '13 at 18:48

Mikos
7,19063367

I did a quick search and found

var drives = DriveInfo.GetDrives();

var removableFatDrives = drives.Where(
    c=>c.DriveType == DriveType.Removable &&
    c.DriveFormat == "FAT" && 
    c.IsReady);

var andriods = from c in removableFatDrives
from d in c.RootDirectory.EnumerateDirectories()
where d.Name.Contains("android")
select c;

Found here: Source

after that you move to the directory where you want to place the files and you can transfer files with
you files with:

String LocalPC_FileLocation = "C://mydoc//mylocation//imagefile";

File.Move(LocalPC_FileLocation , locationofandroiddirectory );
moz-extension://de217b77-76e5-4c27-8c16-6966cb454992/algo.html

answered Jul 9 '13 at 19:01

Mickey Sly
189317

Sign up or log in
Sign up using Google
Sign up using Facebook
Sign up using Email and Password

Post as a guest
Required, but never shown

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service,
privacy policy and cookie policy, and that your continued use of the website is subject to these
policies.

You might also like