我正在编写一个Windows C#(winforms)应用程序,该应用程序将图像从PC复制到Android设备的images文件夹。Windows文件资源管理器提供以下路径:计算机\ SCH-I535\电话\图像,但我无法通过路径以编程方式访问设备。
我不知道如何从我的C#应用程序安装或读取Android设备。我相信这很简单,但我运气不好。
有人能帮忙吗?
此库将帮助您与任何android设备进行通信
http://forum.xda-developers.com/showthread.php?t=1512685
我做了一个快速搜索,找到了
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 );