# onDeviceFound

Canonical page: https://docs.ovok.com/native-sdk/guide/components/bt-management/bt-provider/on-device-found

`onDeviceFound` runs after `BTManager` recognizes a peripheral as one of the provider's `acceptedDevices`. It receives the managed device and the manager instance.

~~~tsx
<BTProvider
  bleManager={bleManager}
  acceptedDevices={acceptedDevices}
  onDeviceFound={async (device, manager) => {
    await device.connect();
    console.log(manager);
  }}
>
  {children}
</BTProvider>
~~~

The callback is asynchronous. Returning `device.connect()` is a common choice when the app should connect as soon as the accepted device appears. If the user must choose a device, use the `autoConnect` and `onDeviceSelectionRequired` flow instead of connecting every discovery.

The `device` is a `BTManagedDevice` for the accepted device key. The manager can be used for supported manager operations; `BTProvider` remains responsible for its scan and lifecycle.

See [BTProvider](/native-sdk/guide/components/bt-management/bt-provider/) for setup and [BluetoothDevicePicker](/native-sdk/guide/components/bt-management/bluetooth-device-picker/) for multi-device choice.
