Skip to main content

onAccessPermissionChanged

onAccessPermissionChanged receives a boolean after the provider's Bluetooth permission request completes. The request runs when BTProvider mounts and again when the app returns to the foreground, so this callback can refresh app UI after a user changes a permission in Settings.

<BTProvider
{...providerProps}
onAccessPermissionChanged={(granted) => {
setBluetoothPermissionGranted(granted);
}}
/>

This reports permission only. It does not mean the Bluetooth radio is powered on or that a peripheral is nearby. Use useBluetoothState or BluetoothStateNotice to handle radio state separately.

Supply permissionFallback if the provider's default Settings prompt does not fit the product's flow. See DefaultPermissionFallback.