jCIFS is a great library for connecting to SMB shares on Android, and it works great with almost all the settings I tested.
However, I take advantage of incredibly low performance when using the method SmbFile.listFiles()for Windows network shares, but only when logging in as an actual user on a PC. It may take up to several minutes to simply get a list of folders, and sometimes nothing happens at all.
If I decided to log in as a guest (using the "guest" as a user and leaving the password blank), everything is fast. Usually less than a second.
The following code works fast:
try {
NtlmPasswordAuthentication authentication = new NtlmPasswordAuthentication("", "guest", "");
currentFolder = new SmbFile("smb://host-name-for-my-pc", authentication);
SmbFile[] listFiles = currentFolder.listFiles();
} catch (Exception e) {
This code, however, does not work / very slow:
try {
NtlmPasswordAuthentication authentication = new NtlmPasswordAuthentication("", "my-username", "my-password");
currentFolder = new SmbFile("smb://host-name-for-my-pc", authentication);
SmbFile[] listFiles = currentFolder.listFiles();
} catch (Exception e) {
, jCIFS, .
ES File Explorer, jCIFS, , .
Update:
SmbFile("username:password@server/") , ! , NtlmPasswordAuthentication. ?