开发者

How to create a file manager that can scan LAN for servers and browse shared folders?

I'm new to Android programming and need to create a file manager with this feature: it should scan LAN for servers and brows开发者_如何转开发e shared folders (like EStrongs File Explorer does it), but yet hadn't found a clue how to do that. Thanks in advance.


Your app will need to talk SMB protocol to do this. Loof at JCIFS library.

There is already an app that does this: Samba Explorer. It's open source so you might (depends on the source) reuse it.


That's a bit of a broad ask.

OK, here's a clue - start with what you know. There are LAN/s, servers and folders, (see, you already have a clue). Design classes to represent them. Start with the top-level class - LAN. Put some methods in to discover all the servers and list them. Don't do anything else until this works 100% with no crashes/leaks/failures. No - don't do it simply, do it properly. Network stuff is slow and blocky - use a threadpool now to scan your LAN/s.

TBH, though I haven't been on SO for all that long, it seems that the developers here like to be asked specific questions about a particular aspect of design/code/whatever that is not working, rather than be asked for a complete top-level design for a complex subsystem/app. They tend to react ineffectively to 'I haven't found a clue' or 'I haven't tried anything'.

Rgds, Martin

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜