My Android application connects to a WCF data service hosted in a Windows Service using odata4j. The communication works well when a specified URL is provided where the service can be found.
However, I need to modify the application to discover the service addresses (multiple computer can run the service in the LAN).
How can I discover these service addresses? Obviously other than trying to connect to each address on LAN using a for loop with a try catch block. Any Android feature for this?

有帮助吗?

解决方案

Apparently there isn't. I created an AsyncTask that runs multiple threads to paralelly discover the LAN addresses. It is not pretty but sometimes there is no alternative.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top