title: How to access a file in Android studio with CIFS
body: <p>I'm writing to code in Android Studio, but I have a problem. I would like to access to exist file on windows shares. Unfornately when I debugging or running the code, it is not working for me. I know that emulator is not same network, but I downloaded ping app and I sent ping, imcp to server what worked. 
  I downloaded jcifs-1.3.19.jar then I imported in project, but always stuck at one point. </p>
  
  <pre><code>SmbFileInputStream in = new SmbFileInputStream("smb://host/c/My Documents/somefile.txt", auth);
  </code></pre>
  
  <p>This code is from the official site. 
  <a href="https://www.jcifs.org/src/docs/api/" rel="nofollow noreferrer">https://www.jcifs.org/src/docs/api/</a></p>
  
  <p>I've tried it in many ways. Why is not working on emulator?</p>
  
  <pre><code>import jcifs.smb.*;
  try{
  jcifs.Config.setProperty( "jcifs.netbios.wins", "192.168.1.220" );
  NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("domain", "username", "password");
  SmbFileInputStream in = new SmbFileInputStream("smb://host/c/My Documents/somefile.txt", auth);
  byte[] b = new byte[8192];
  int n;
  while(( n = in.read( b )) &gt; 0 ) {
      System.out.write( b, 0, n );
  }
  }
  catch(Exeption e)
  {}
  </code></pre>
  
  <p>Any help is appreciated.</p>