Hi Mehdouch
You simply need to create a ServiceTracker that watches for services of
type UPnPDevice, for example:
ServiceTrackerCustomizer stc = new ServiceTrackerCustomizer(){
public Object addingService(ServiceReference arg0) {
// when a new device is found, this method will get hit
// if you're interested in tracking the device, you should get
the
service from the
// reference and return it from this method
return null;
}
public void modifiedService(ServiceReference arg0, Object arg1) {
}
public void removedService(ServiceReference arg0, Object arg1) {
// when a tracked device disappeared, this method will be called
}
};
ServiceTracker tracker = new ServiceTracker(context,
UPnPDevice.class.getName(), stc);
tracker.open();
...
Bruce
On 03/05/2011 09:51, "mehdouch" <[email protected]> wrote:
>
>Hi all,
>
>How can I implements a simple upnp listener using felix upnp basedriver ?
>
>
>thanks
>
>--
>View this message in context:
>http://old.nabble.com/upnp-listener-tp31530489p31530489.html
>Sent from the Apache Felix - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]