BluetoothBuilder
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
a method for creating the Permissions object to manage the Bluetooth permissions. Needs to have com.splendo.kaluga.permissions.bluetooth.BaseBluetoothPermissionManagerBuilder and com.splendo.kaluga.permissions.location.BaseLocationPermissionManagerBuilder registered.
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