Getting Host or ip from device

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting Host or ip from device

Olivier
Hello,

i'm using Cling (1.0.5) on android to list all device available on a network (nothing more).

How can i get network information about device ? by exploring a Device object i found a "host" parameter inside a RemoteDeviceIdentity object which contain the device IP, is there a way to get this parameter ?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Getting Host or ip from device

Christian Bauer
Administrator
RemoteDeviceIdentity#getDescriptiorUrl()#getHost()?

That's the only IP/hostname that the host would like you to use and where you can definitely reach it.

Reply | Threaded
Open this post in threaded view
|

Re: Getting Host or ip from device

Olivier
RemoteDeviceIdentity#getDescriptiorUrl()#getHost()?

Yes,

What should i do to get an instance of RemoteDeviceIdentity from a  RegistryListener's method like remoteDeviceDiscoveryStarted() or remoteDeviceAdded() ?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Getting Host or ip from device

Christian Bauer
Administrator
device.getIdentity()?

Reply | Threaded
Open this post in threaded view
|

Re: Getting Host or ip from device

Olivier
Damn , i was working with a Device and not a RemoteDevice ... obviously getIdentity() isn't returning what i was expecting.

Thanks for your time.