BluetoothBuilder

A default implementation of BaseBluetoothBuilder that delegates the client side to BluetoothClientBuilder and the server side to BluetoothServerBuilder.

Parameters

applicationContext

the Context in which Bluetooth should run

permissionsBuilder
scannerBuilder

the BaseScanner.Builder for creating the BaseScanner to handle scanning

A default implementation of BaseBluetoothBuilder that delegates the client side to BluetoothClientBuilder and the server side to BluetoothServerBuilder.

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

bundle

the NSBundle in which Bluetooth should run

A default implementation of BaseBluetoothBuilder

Constructors

Link copied to clipboard
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))
constructor(bundle: NSBundle = NSBundle.mainBundle, permissionsBuilder: suspend (CoroutineContext) -> Permissions = { context -> Permissions( PermissionsBuilder(bundle).apply { registerBluetoothPermissionIfNotRegistered() }, context, ) }, scannerBuilder: DefaultScanner.Builder = DefaultScanner.Builder())

Functions

Link copied to clipboard
open fun create(scannerSettingsBuilder: (Permissions) -> BaseScanner.Settings = { BaseScanner.Settings(it) }, coroutineContext: CoroutineContext = defaultBluetoothClientDispatcher): BluetoothClient
open fun create(scannerSettingsBuilder: (Permissions) -> BaseScanner.Settings = { BaseScanner.Settings(it) }, coroutineContext: CoroutineContext = defaultBluetoothClientDispatcher): BluetoothClient
open fun create(scannerSettingsBuilder: (Permissions) -> BaseScanner.Settings = { BaseScanner.Settings(it) }, coroutineContext: CoroutineContext = defaultBluetoothClientDispatcher): BluetoothClient
Link copied to clipboard
actual open override fun createClient(scannerSettingsBuilder: (Permissions) -> BaseScanner.Settings, coroutineContext: CoroutineContext): BluetoothClient
actual open override fun createClient(scannerSettingsBuilder: (Permissions) -> BaseScanner.Settings, coroutineContext: CoroutineContext): BluetoothClient
expect open override fun createClient(scannerSettingsBuilder: (Permissions) -> BaseScanner.Settings, coroutineContext: CoroutineContext): BluetoothClient
Link copied to clipboard
actual open suspend override fun createServer(settingsBuilder: (Permissions) -> ServerSettings, coroutineContext: CoroutineContext, specs: BluetoothServerDSL.() -> Unit): BluetoothServer
actual open suspend override fun createServer(settingsBuilder: (Permissions) -> ServerSettings, coroutineContext: CoroutineContext, specs: BluetoothServerDSL.() -> Unit): BluetoothServer
expect open suspend override fun createServer(settingsBuilder: (Permissions) -> ServerSettings, coroutineContext: CoroutineContext, specs: BluetoothServerDSL.() -> Unit): BluetoothServer