我正在寫一個Windows C#(winforms)應用程序,它將圖像從PC複製到Android設備Images文件夾。 Windows文件資源管理器給了我這個路徑: Computer \ SCH-I535 \ Phone \ Images但我無法通過路徑以編程方式訪問設備。從C#windows應用程序讀取/寫入三星android手機/平板電腦
我不確定如何從我的C#應用程序掛載或讀取Android設備。我確信這是簡單的,但我沒有運氣。
任何人都可以幫忙嗎?
我正在寫一個Windows C#(winforms)應用程序,它將圖像從PC複製到Android設備Images文件夾。 Windows文件資源管理器給了我這個路徑: Computer \ SCH-I535 \ Phone \ Images但我無法通過路徑以編程方式訪問設備。從C#windows應用程序讀取/寫入三星android手機/平板電腦
我不確定如何從我的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;
這裏找到:Source
後你移動到要放置文件的目錄,你可以用你的文件與文件傳輸:
String LocalPC_FileLocation = "C://mydoc//mylocation//imagefile";
File.Move(LocalPC_FileLocation , locationofandroiddirectory);
已經在這裏問:http://stackoverflow.com/questions/16762215/c-sharp-file-manipulation-galaxy-s3-sd-card是不是有一個銀河的USB驅動器模式? – spender
我只在S3上看到媒體設備(MTP)和相機(PTP)選項。 – Mikos