[+] Ability to close a ble
This commit is contained in:
@@ -86,6 +86,7 @@ class ActivityScan : AppCompatActivity() {
|
||||
{
|
||||
view.snack("✅ Connected.")
|
||||
prefs.chosenDevice = address
|
||||
ble.close()
|
||||
finish()
|
||||
}
|
||||
}
|
||||
@@ -78,6 +78,11 @@ internal class BluetoothHandler private constructor(context: Context) {
|
||||
}
|
||||
}
|
||||
|
||||
fun close() {
|
||||
central.close()
|
||||
instance = null
|
||||
}
|
||||
|
||||
companion object {
|
||||
val decoders = listOf(BatteryDecoder(), BloodPressureDecoder(), GlucoseDecoder(), HeartRateDecoder(),
|
||||
PLXSpotDecoder(), PLXContinuousDecoder(), TemperatureDecoder(), WeightDecoder())
|
||||
|
||||
Reference in New Issue
Block a user