Previous Topic

Next Topic

Book Contents

Book Index

Searching for Devices (deprecated)

You can send a request to a protocol adapter to launch a search for devices through the associated protocol. The search might result in detection of new devices or in removal of not available ones.

To launch a search for home devices in the network:

  1. Retrieve the Home Device Admin service ().
  2. Invoke the searchHomeDevices method of the Home Device Admin passing the following arguments:

The search operation will be executed asynchronously. If you want to know if a device is added or removed as a result of the search, register an Event Handler compliant with the OSGi Event Admin service that will listen for events with HomeDeviceEventConstants.TOPIC_HOME_DEVICE_ADDED or HomeDeviceEventConstants.TOPIC_HOME_DEVICE_REMOVED topics. For more information refer to Receiving Events about Changes in the Devices.