Can you post a link to such sample?
Example of solution based on UDP broadcasting:
MQTT Chat with Auto Discovery
To be fair - I was in the context of some apps that do this. (solid explorer)
eg:
I can't recall if in my Goog travels that I came across a "reasonable" example. (I hit quite a few sites today).
I played (actually today!) with the CFIS/CMB examples on this forum - and they work rather well.
eg:
This library provides access to Microsoft Windows Network. See this tutorial: http://www.b4x.com/forum/basic4android-getting-started-tutorials/17179-android-smb-cifs-tutorial.html#post98176 This library is based on JCIFS library: JCIFS Installation instructions: - Unzip the attached file and...
www.b4x.com
Some "very" interesting reading on this subject - this article suggests that "legacy" pipes that exist on the network may be a "easy" way to do this:
it suggests that using "pipes" that exist on networks could give the result
eg:
\MAILSLOT\BROWSE | = | The Mailslot name used by the Windows NT Browse Service. |
\MAILSLOT\LANMAN | = | The Mailslot name used by the older LAN Manager Browse Service. |
So, above might one possible easy path (but the above is rather "older legacy" when it comes to windows.
But, I was thinking this suggests something like this with CFIS might be possbile:
SMB1.ListFiles("smb://ALBERTKALLAL-PC/MAILSLOT/LANMAN/", "") would be a potential approach.
or:
SMB1.ListFiles("smb://MAILSLOT/LANMAN/", "") would be a potential approach (however, this is a knowledge area I don't have - not at all sure how pipes work, or are supported).
My spider sense is that most solutions likely use some kind of UDF approach - and rotate say on the assumed 192.0.0.1 range. (but I am not sure).
I might have missed that UDF is not too much work to "get" the computers on the LAN.
And to be fair, I did not want to push too much on this issue here. I found the above read and link on cifs browsing a VERY interesting article never the less.
Where I was going with this?
Well I have jDBC working really nice with SQL server. (using jtds-ds driver). I can't believe how easy this was.
(the B4A candy store here is really impressive!!! - always finding what I want! Keep me out of these examples! - I not getting any work done!).
And I felt so bad in reading about jDBC + jtds. I wanted to "stop" and post some help! I saw so many posts around the internet with people having trouble using the library. The problem is they all NEAR miss the fact that SQL server for some time now enforces the requirement to specify the named instance of SQL server. I may well post on forums here how one must specify the named instance - if one does not, then jDBC will not seem to work. Setting the named instance of SQL server thus makes it work all so easy. (anyway - I am getting off topic!).
So, with jDBC working, then I thought, golly gee, why not add something that "lists" out computers, and then from that lists out instances of SQL server on the network!
And if that works, then why not display the databases. And from that, click on a table. And then display some data!
So, a cute sql browser app that lets you choose a table and view it. And it would be a great "tester" to see if sql server allows jDBC connections on the network.
However I don't want to lean too hard on a solution unless it "kind of easy" or something exists kicking around that makes this easy.
I'll take a look at the MQTT chat - that was quite much next on my list (and I realize that this may well not provide a list of computers or devices on the network).
Regards,
Albert D. Kallal
Edmonton, Alberta Canada