dking
Posts: 2
Joined: Thu Aug 28, 2008 1:36 am
Location: Canada

Running a device discovery more than once

Mon Sep 29, 2008 10:33 pm

In another posting you stated:
"Devices found when you call DiscoverDevicesAsync() are cached in Network.Devices[]. If you run a device discovery again they won't trigger any DeviceDiscovered events and thus not be added to the list of devices in FindAndConnect."

Is there a way to clear the Network.Devices cache so that DiscoverDevicesAsync() can be run a second time? If not, is there any way of running it a second time? Our application requires that we search for devices in one location, then move to another location and search again without having to restart the application.

Jonas
Posts: 2319
Joined: Mon Jan 09, 2006 2:20 pm
Location: Sweden

RE: Running a device discovery more than once

Mon Sep 29, 2008 10:55 pm

No, it's not possible to clear the cache right now, but you can run the discovery again of course.
You can add the devices on ServiceDiscoveryCompleted by just iterating the Network.Devices array.

Regards,
Jonas

Return to “BlueTools”