Trying to use SmbFileInputStream

后端 未结 2 1463
小鲜肉
小鲜肉 2020-12-22 07:29

This is an updated version of a question I asked last week.
I\'m trying to use SmbFileInputStream to connect my Android to my PC,
but the app aborts (on my tablet) w

相关标签:
2条回答
  • 2020-12-22 08:13

    I'm also having the same problem, but I just wanted to partially answer your question by adding in a few catches that you should include in your code so that it doesn't do a hard crash.

    Here are the catches that I've added in my code

    catch (SmbException 
          | MalformedURLException 
          | UnknownHostException 
          | NetworkOnMainThreadException 
          | ExceptionInInitializerError e)
    

    If I find any more information I'll edit this post.

    0 讨论(0)
  • 2020-12-22 08:25

    did you try "smb://username:password@local ip/" do it with the actual IP address. for me I had to do it with IP, with computer name my app never connected to windows share and crashed.

    0 讨论(0)
提交回复
热议问题