startLimited

fun startLimited(UUID: String = "FC5A")

Starts BluetoothService as a background service. No notification is posted.

This only works while the app is in the foreground. On Android 8 (API 26) and later, Context.startService throws if the app is in the background, and the system stops background services once the app leaves the foreground. The host app must call this again each time it returns to the foreground. A repeat call while the service is still running is ignored. Use start when BLE work must continue after the app is backgrounded.

Parameters

UUID

The service UUID to scan for, as a string. Defaults to FC5A.