質問

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