I'm working on an android app, and I can actually get a list of all my files, but can't use the URL to open a file from the list, I also tried to open from InputStream
, but this does not work.
What I want to do is something like ES File Explorer does, I know they use JCIFS library, and that when you open a file (an MP3 for example), they make some kind of Tunnel with sockets, that reads the file and pass it to the propper app in an HTTP format.
Example:
If my nas file path is:
smb://My_IP_Address/SharedFolder/Media/MyMusic.mp3
ES File Explorer send an URL like this:
http:// 127.0.0.1:59777/smb%2FMy_IP_Address%2FSharedFolder%2FMedia%2FMyMusic.mp3
Sorry, I want to use comment instead of answer, but I don't have enough reputation...
What I found on ES Explore or other same app, they seemed not only use JCIFS , but also use nanoHTTPD...
They transfer the nas file to samba file, then use nanoHTTPD as a Streaming server to serve the multimedia files...
There got many sample on the web, here a discussion => How to serve a file on sdcard using NanoHTTPD (inside Android)
Hope this can help you...