File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ # SupportedScanSettingsLibrary
2+ An Android Library that implements ScanSettings support for all devices.
3+
4+ ## Gradle Dependency
5+ - gradle project level
6+ ``` gradle
7+ allprojects {
8+ repositories {
9+ // ...
10+ maven { url 'https://jitpack.io' }
11+ }
12+ }
13+ ```
14+ - gradle application level
15+ ``` gradle
16+ dependencies {
17+ implementation 'com.github.Datalux:SupportedScanSettingsLibrary:1.0'
18+ }
19+ ```
20+
21+
22+ ## Usage
23+ ### Default SupportedScanSettings
24+
25+ ``` kotlin
26+ val supportedScanSettings = SupportedScanSettings ().getBuilder(BluetoothAdapter .getDefaultAdapter())
27+ ```
28+
29+ ### Custom SupportedScanSettings
30+ You can set ` ScanMode ` , ` MatchMode ` , ` NumOfMatch ` or ` CallbackType ` programmatically using ` getBuilder ` params.
31+ ``` kotlin
32+ val supportedScanSettings = SupportedScanSettings ().getBuilder(
33+ BluetoothAdapter .getDefaultAdapter(),
34+ scanMode = ScanSettings .SCAN_MODE_BALANCED ,
35+ matchMode = ScanSettings .MATCH_MODE_STICKY ,
36+ numOfMatch = ScanSettings .MATCH_NUM_FEW_ADVERTISEMENT ,
37+ callbackType = ScanSettings .CALLBACK_TYPE_FIRST_MATCH
38+ )
39+ ```
40+
41+
42+ #### Params
43+ See https://developer.android.com/reference/kotlin/android/bluetooth/le/ScanSettings
You can’t perform that action at this time.
0 commit comments