observe Peers
Request information about Ditto peers in range of this device.
This method returns an observer which will invoke the provided lambda for each update. A newly registered observer will have a peers update delivered to it immediately. Then it will be invoked repeatedly when Ditto devices come and go, or the active connections to them change.
When the observer is no longer required the caller must call close()
on the returned PeersObserver
.
Parameters
the lambda to be invoked when there is an update.
Request information about Ditto peers in range of this device.
This method returns an observer which will invoke the provided lambda for each update. A newly registered observer will have a peers update delivered to it immediately. Then it will be invoked repeatedly when Ditto devices come and go, or the active connections to them change.
When the observer is no longer required the caller must call close()
on the returned PeersObserver
.
Parameters
an object that implements the DittoPeersObserverCallback interface, whose update
function will be called when there is an update.