BluetoothClientBuilder

constructor(applicationContext: Context = ApplicationHolder.applicationContext, permissionsBuilder: suspend (CoroutineContext) -> Permissions = { context -> Permissions( PermissionsBuilder(PermissionContext(applicationContext)).apply { registerBluetoothPermissionIfNotRegistered() registerLocationPermissionIfNotRegistered() }, coroutineContext = context, ) }, scannerBuilder: BaseScanner.Builder = DefaultScanner.Builder(applicationContext = applicationContext))

Parameters

applicationContext

the Context in which Bluetooth should run

permissionsBuilder
scannerBuilder

the BaseScanner.Builder for creating the BaseScanner to handle scanning

constructor(bundle: NSBundle = NSBundle.mainBundle, permissionsBuilder: suspend (CoroutineContext) -> Permissions = { context -> Permissions( PermissionsBuilder(bundle).apply { registerBluetoothPermissionIfNotRegistered() }, context, ) }, scannerBuilder: DefaultScanner.Builder = DefaultScanner.Builder())

Parameters

bundle

the NSBundle in which Bluetooth should run

permissionsBuilder

a method for creating the Permissions object to manage the Bluetooth permissions. Needs to have com.splendo.kaluga.permissions.bluetooth.BaseBluetoothPermissionManagerBuilder registered.

scannerBuilder

the BaseScanner.Builder for creating the BaseScanner to handle scanning

constructor(permissionsBuilder: suspend (CoroutineContext) -> Permissions = { context -> Permissions( PermissionsBuilder().apply { registerBluetoothPermissionIfNotRegistered() }, context, ) }, scannerBuilder: BaseScanner.Builder = DefaultScanner.Builder())

Parameters

permissionsBuilder

a method for creating the Permissions object to manage the Bluetooth permissions. Needs to have com.splendo.kaluga.permissions.bluetooth.BaseBluetoothPermissionManagerBuilder registered.

scannerBuilder

the BaseScanner.Builder for creating the BaseScanner to handle scanning


constructor(permissionsBuilder: suspend (CoroutineContext) -> Permissions = { context -> Permissions( PermissionsBuilder().apply { registerBluetoothPermissionIfNotRegistered() }, context, ) }, optionalServices: List<UUID>, pickerSettings: WebDevicePickerSettings = WebDevicePickerSettings())

Constructor that creates a BaseBluetoothClientBuilder with a DefaultScanner

Parameters

permissionsBuilder

a method for creating the Permissions object to manage the Bluetooth permissions. Needs to have com.splendo.kaluga.permissions.bluetooth.BaseBluetoothPermissionManagerBuilder registered.

optionalServices

the advertisement-independent service access allowlist passed to requestDevice. Services that are not advertised (or only available after connecting) must be listed here to be reachable.

pickerSettings

the WebDevicePickerSettings configuring the "Add Device" overlay