What is the file path for specifying file transfer from Android to a Windows PC?

I am going to create a C # windows application to transfer an image file from an Android phone to my Wondows computer - when I connect my phone to my computer (using a data cable). When I gave the path "Computer / Nuxes5 / ..." in C # to access files from mobile devices (obtained from the address bar of Windows Explorer). Then get the wrong way. Below is the code I gave to access the files.

Directory.GetFiles(@"Computer/Nuxes5/...");

Can anyone suggest me how to access mobile files using C #.

+4
source share
1 answer

MTP. Windows, COM Windows PortableDeviceApiLib. . WPD API .

Microsoft MTP Simulator 3.0 , .

MTP , , . , , , , objectFormatCode. , 0x3001. MTP Spec.

WPD/PTP MTP . .

  • , getStorageIds();
  • ( /SD-) getObjectHandles(), /.
  • , . getObjectInfo(), .
  • , , , getObject(), .

, . getObject() , .

+1

Source: https://habr.com/ru/post/1584880/


All Articles