Question

I want to acces files on my LAN (on a NAS or PC) by an Android app like I can do on Windows by typing \pcname\ in the explorer. I know this is possible on Android, because there are other apps that do this (e.g. https://play.google.com/store/apps/details?id=com.rhmsoft.fm).

I already tried accessing the file as a local file (new File("\\pcname\")). Needless to say this did not work. I searched the web for tutorials, but every tutorial I found was using ftp, http and so on.

Was it helpful?

Solution

Using java.net.URL you can use ftp urls like ftp://servername/path/to/file. To access windows share, you need to use the SMB protocol (there is similar question: How to access share folder in windows through android and read files )

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top