Skip to content

Commit 97a4cb5

Browse files
committed
readme/doc
1 parent 73f4502 commit 97a4cb5

30 files changed

+127
-92
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* [Interaction](#interaction)
4949
* [Debugging](#debugging)
5050
* [isBluetoothEnabled](#isbluetoothenabled)
51-
* [hasLocationPermission](#haslocationpermission)
51+
* [Permissions (Android)](#permissions-android)
5252
* [requestLocationPermission](#requestlocationpermission)
5353
* [enable (Android only)](#enable-android-only)
5454
* [startScanning](#startscanning)
@@ -136,12 +136,12 @@ bluetooth.isBluetoothEnabled().then(
136136
}
137137
);
138138
```
139-
### hasLocationPermission
140-
__Since plugin version 1.2.0 the `startScanning` function will handle this internally so it's no longer mandatory to add permission checks to your code.__
139+
### Permissions (Android)
141140

142-
On Android 6 you need to request permission to be able to interact with a Bluetooth peripheral (when the app is in the background) when targeting API level 23+. Even if the `uses-permission` tag for `ACCESS_COARSE_LOCATION` is present in `AndroidManifest.xml`.
141+
On Android >= 6 and < 12 you need to request permissions to be able to interact with a Bluetooth peripheral (when the app is in the background) when targeting API level 23+. You need `BLUETOOTH` and `ACCESS_FINE_LOCATION`. You should read the doc [here](https://developer.android.com/develop/connectivity/bluetooth/bt-permissions)
143142

144-
Note that for `BLUETOOTH` and `BLUETOOTH_ADMIN` you don't require runtime permission; adding those to `AndroidManifest.xml` suffices (which the plugin does for you).
143+
On android >= 12 you need new permissions. You should read the doc [here](https://developer.android.com/develop/connectivity/bluetooth/bt-permissions)
144+
Note that for `BLUETOOTH` and `BLUETOOTH_ADMIN` you don't require runtime permission; adding those to `AndroidManifest.xml` suffices.
145145

146146
Note that `hasLocationPermission ` will return true when:
147147
* You're running this on iOS, or

docs/assets/main.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/style.css

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
--light-color-text-aside: #6e6e6e;
1212
--light-color-link: #1f70c2;
1313

14+
--light-color-ts-keyword: #056bd6;
1415
--light-color-ts-project: #b111c9;
1516
--light-color-ts-module: var(--light-color-ts-project);
1617
--light-color-ts-namespace: var(--light-color-ts-project);
@@ -28,7 +29,7 @@
2829
--light-color-ts-constructor-signature: var(--light-color-ts-constructor);
2930
--light-color-ts-parameter: var(--light-color-ts-variable);
3031
/* type literal not included as links will never be generated to it */
31-
--light-color-ts-type-parameter: var(--light-color-ts-type-alias);
32+
--light-color-ts-type-parameter: #a55c0e;
3233
--light-color-ts-accessor: var(--light-color-ts-property);
3334
--light-color-ts-get-signature: var(--light-color-ts-accessor);
3435
--light-color-ts-set-signature: var(--light-color-ts-accessor);
@@ -50,6 +51,7 @@
5051
--dark-color-text-aside: #dddddd;
5152
--dark-color-link: #00aff4;
5253

54+
--dark-color-ts-keyword: #3399ff;
5355
--dark-color-ts-project: #e358ff;
5456
--dark-color-ts-module: var(--dark-color-ts-project);
5557
--dark-color-ts-namespace: var(--dark-color-ts-project);
@@ -67,7 +69,7 @@
6769
--dark-color-ts-constructor-signature: var(--dark-color-ts-constructor);
6870
--dark-color-ts-parameter: var(--dark-color-ts-variable);
6971
/* type literal not included as links will never be generated to it */
70-
--dark-color-ts-type-parameter: var(--dark-color-ts-type-alias);
72+
--dark-color-ts-type-parameter: #e07d13;
7173
--dark-color-ts-accessor: var(--dark-color-ts-property);
7274
--dark-color-ts-get-signature: var(--dark-color-ts-accessor);
7375
--dark-color-ts-set-signature: var(--dark-color-ts-accessor);
@@ -91,6 +93,7 @@
9193
--color-text-aside: var(--light-color-text-aside);
9294
--color-link: var(--light-color-link);
9395

96+
--color-ts-keyword: var(--light-color-ts-keyword);
9497
--color-ts-module: var(--light-color-ts-module);
9598
--color-ts-namespace: var(--light-color-ts-namespace);
9699
--color-ts-enum: var(--light-color-ts-enum);
@@ -132,6 +135,7 @@
132135
--color-text-aside: var(--dark-color-text-aside);
133136
--color-link: var(--dark-color-link);
134137

138+
--color-ts-keyword: var(--dark-color-ts-keyword);
135139
--color-ts-module: var(--dark-color-ts-module);
136140
--color-ts-namespace: var(--dark-color-ts-namespace);
137141
--color-ts-enum: var(--dark-color-ts-enum);
@@ -180,6 +184,7 @@ body {
180184
--color-text-aside: var(--light-color-text-aside);
181185
--color-link: var(--light-color-link);
182186

187+
--color-ts-keyword: var(--light-color-ts-keyword);
183188
--color-ts-module: var(--light-color-ts-module);
184189
--color-ts-namespace: var(--light-color-ts-namespace);
185190
--color-ts-enum: var(--light-color-ts-enum);
@@ -219,6 +224,7 @@ body {
219224
--color-text-aside: var(--dark-color-text-aside);
220225
--color-link: var(--dark-color-link);
221226

227+
--color-ts-keyword: var(--dark-color-ts-keyword);
222228
--color-ts-module: var(--dark-color-ts-module);
223229
--color-ts-namespace: var(--dark-color-ts-namespace);
224230
--color-ts-enum: var(--dark-color-ts-enum);
@@ -260,12 +266,12 @@ h6 {
260266
line-height: 1.2;
261267
}
262268

263-
h1 > a,
264-
h2 > a,
265-
h3 > a,
266-
h4 > a,
267-
h5 > a,
268-
h6 > a {
269+
h1 > a:not(.link),
270+
h2 > a:not(.link),
271+
h3 > a:not(.link),
272+
h4 > a:not(.link),
273+
h5 > a:not(.link),
274+
h6 > a:not(.link) {
269275
text-decoration: none;
270276
color: var(--color-text);
271277
}
@@ -643,6 +649,28 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark {
643649
font-weight: bold;
644650
}
645651

652+
.tsd-full-hierarchy:not(:last-child) {
653+
margin-bottom: 1em;
654+
padding-bottom: 1em;
655+
border-bottom: 1px solid var(--color-accent);
656+
}
657+
.tsd-full-hierarchy,
658+
.tsd-full-hierarchy ul {
659+
list-style: none;
660+
margin: 0;
661+
padding: 0;
662+
}
663+
.tsd-full-hierarchy ul {
664+
padding-left: 1.5rem;
665+
}
666+
.tsd-full-hierarchy a {
667+
padding: 0.25rem 0 !important;
668+
font-size: 1rem;
669+
display: inline-flex;
670+
align-items: center;
671+
color: var(--color-text);
672+
}
673+
646674
.tsd-panel-group.tsd-index-group {
647675
margin-bottom: 0;
648676
}
@@ -708,12 +736,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark {
708736
}
709737
.tsd-navigation > a,
710738
.tsd-navigation .tsd-accordion-summary {
711-
width: calc(100% - 0.5rem);
739+
width: calc(100% - 0.25rem);
740+
display: flex;
741+
align-items: center;
712742
}
713743
.tsd-navigation a,
714744
.tsd-navigation summary > span,
715745
.tsd-page-navigation a {
716-
display: inline-flex;
746+
display: flex;
747+
width: calc(100% - 0.25rem);
717748
align-items: center;
718749
padding: 0.25rem;
719750
color: var(--color-text);
@@ -753,11 +784,6 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark {
753784
margin-left: -1.5rem;
754785
}
755786

756-
.tsd-nested-navigation > li > a,
757-
.tsd-nested-navigation > li > span {
758-
width: calc(100% - 1.75rem - 0.5rem);
759-
}
760-
761787
.tsd-page-navigation ul {
762788
padding-left: 1.75rem;
763789
}
@@ -984,6 +1010,11 @@ a.tsd-index-link {
9841010
overflow-x: auto;
9851011
}
9861012

1013+
.tsd-signature-keyword {
1014+
color: var(--color-ts-keyword);
1015+
font-weight: normal;
1016+
}
1017+
9871018
.tsd-signature-symbol {
9881019
color: var(--color-text-aside);
9891020
font-weight: normal;

docs/classes/Bluetooth.html

Lines changed: 12 additions & 12 deletions
Large diffs are not rendered by default.

docs/classes/BluetoothError.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/enums/CallbackType.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/enums/MatchMode.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/enums/MatchNum.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/enums/ScanMode.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/functions/getBluetoothInstance.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/hierarchy.html

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

docs/index.html

Lines changed: 5 additions & 5 deletions
Large diffs are not rendered by default.

docs/interfaces/AdvertismentData.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/interfaces/Characteristic.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)