3

I want to make an Android app that browses files in the shared network.

Given a PC name, i.e DESKTOP-T6Y766Y I can browse the files
(with JCIFS library: new SmbFile("smb://DESKTOP-T6Y766Y/...")).

But I want to have the user to choose a PC from the shared ones in the local network.

For clarification: I marked in red the Strings I want my code to get: enter image description here

I tried to use JCIFS library using this code:

SmbFile[] domains;
        domains = (new SmbFile("smb://")).listFiles();
        for (int i = 0; i < domains4.length; i++) {
            System.out.println(domains[i]);
        }

But it doesn't work:

jcifs.smb.SmbException: Failed to connect to server java.net.UnknownHostException: ..__MSBROWSE__.<01>

TheLogicGuy
  • 682
  • 8
  • 19

0 Answers0