我正在写一个Windows C#(winforms)应用程序,它将图像从PC复制到Android设备Images文件夹。 Windows文件资源pipe理器给了我这个path:Computer \ SCH-I535 \ Phone \ Images但我不能通过path以编程方式访问设备。
我不知道如何挂载或从我的C#应用程序读取Android设备。 我确信这是简单的,但我没有运气。
谁能帮忙?
这个库将帮助你与任何的Android设备进行通信
我做了一个快速搜索,发现
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;
在这里找到: 来源
之后,您将移动到您要放置文件的目录,您可以使用以下文件传输文件:
String LocalPC_FileLocation = "C://mydoc//mylocation//imagefile"; File.Move(LocalPC_FileLocation , locationofandroiddirectory );