Вопрос

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