BLE Discovery
Scanning methods are Kotlin extensions from sdk-bluetooth and must be imported. Results are emitted by subscribeBluetoothDeviceList() in device events. Check permissions first: BLUETOOTH_SCAN and BLUETOOTH_CONNECT on Android API 31 and above, location permissions on older versions.
import com.gizwits.smart.sdk.GizSDKManager
import com.gizwits.smart.sdk.bluetooth.startBleScan
import com.gizwits.smart.sdk.bluetooth.stopBleScan
GizSDKManager.startBleScan()
// When scanning is no longer needed:
// GizSDKManager.stopBleScan()Observe the subscribeBleScanError() Flow for failures. The Unit return value of startBleScan() is not confirmation that scanning succeeded.