How to access the shared folder in windows via android and read files

I need to connect from my Android phone to Windows sharing and file access. I saw some examples of applications on the Android market that access shared folders using smb / samba. But I have no idea how to create such an application. Many thanks.

+3
source share
2 answers

You need to get JCIFS and use SmbFile to interact with files over the network,

http://lists.samba.org/archive/jcifs/2007-September/007465.html

this is a quick example of how to list files, roughly you must have permission on the Internet. So far, although every time I try to call SmbFile.listFiles (); I get an UnknownHostException, but other seams to be able to do this without a problem, this might work for you, try it!

+5
source

Google has released a simple, free Samba client. This is on github so you can watch and use everything you need: https://github.com/google/samba-documents-provider

Another option is JCIFS: https://jcifs.samba.org/ . There you can find a library and examples of how to use it.

0
source

All Articles