Skip to content

Commit 86f29cd

Browse files
committed
Add AndroidCentral.isEnabled
1 parent 3fcf131 commit 86f29cd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Sources/AndroidBluetooth/AndroidCentral.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ public final class AndroidCentral: CentralManager {
3838
}
3939
}
4040

41+
public var isEnabled: Bool {
42+
get async {
43+
return hostController.isEnabled()
44+
&& hostController.getBluetoothLeScanner() != nil
45+
}
46+
}
47+
4148
public let options: Options
4249

4350
internal let storage = Storage()

0 commit comments

Comments
 (0)