Retrieve a list of Bluetooth-enabled devices that are within range.
#include <btapi/btdevice.h>
bt_remote_device_t** bt_disc_retrieve_devices(const int option, int *device_count_ptr)
BlackBerry 10.0.0
Specifies whether to retrieve the paired (BT_DISCOVERY_PREKNOWN), found (BT_DISCOVERY_CACHED), or connected (BT_DISCOVERY_CONNECTED) devices.
(Optional) A pointer to an integer to store the number of retrieved devices. If you do not want to use this value, provide a value of NULL.
int device_count; if( ( device_count = bt_disc_retrieve_count( BT_DISCOVERY_CACHED ) ) > 0 ) { struct bt_remote_device_t **remote_device_array; if( ( remote_device_array = bt_disc_retrieve_devices(BT_DISCOVERY_CACHED, &device_count)) != NULL ) { // do work with the devices bt_rdev_free_array( remote_device_arry ); } }