Search code examples
androidandroid-wifi

How to access files on SD card through Wi-Fi?


As we know, when Android is connected to a PC through USB cable, the SD card is configured as a mass storage device, and mapped to a drive letter. Thus, a PC program can use the drive letter to access files on the SD card. Now I want to eliminate the use of the cable, and use Wi-Fi instead. My question is:

When a PC and and an Android are on the same router/LAN through Wi-Fi, programmatically, how can a PC program (written in MFC) access the files stored in the SD card?

I know this question is a little too broad, but at this point, all I need is a pointer to a few technologies I need to start looking. Thank you very much.


Solution

  • Wwyt,

    There is no way to force the Android Device to give away its data from the PC side. It would require at the very least a small Android Application on the device. It was implemented this way on purpose. Mind you the Android Application need not be complex, merely respond to the Wifi connected event and set up the appropriate environment. The PC Application may then run what it needs to get its connection.

    There are several applications which utilize this pairing to some degree. EZTether, for instance, utilizes a "swap file" via proxy server to distribute a web connection to the PC side. Such a pairing still requires the full pair, to my knowledge.

    In essence, the issue is this: An Android Device cannot be told what to do without intervention by some local counterpart. The local counterpart may be a User or an Application. If its a User, then there must be a Interface by which they can give the correct answer. If it is an application, it must be told to run by either a User or by responding to an event, (system or otherwise). In other words, without cracking the device, one cannot force this issue remotely.

    Hope this helps,

    FuzzicalLogic