You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -54,10 +54,12 @@ export class MyHealthyClass {
54
54
```
55
55
56
56
### `isAvailable`
57
-
This function does not return a Promise; it resolves immediately, and tells you whether or not the device supports Health Data. On iOS this is probably always `true`. On Android the user will be prompted to (automatically) update their Play Services version in case it's not sufficiently up to date.
57
+
This tells you whether or not the device supports Health Data. On iOS this is probably always `true`.
58
+
On Android the user will be prompted to (automatically) update their Play Services version in case it's not sufficiently up to date.
59
+
If you don't want this behavior, pass false to this function, as shown below.
58
60
59
61
```typescript
60
-
this.healthData.isAvailable()
62
+
this.healthData.isAvailable(false)
61
63
.then(available=>console.log(available));
62
64
```
63
65
@@ -98,6 +100,9 @@ By default data is not aggregated, so all individual datapoints are returned.
98
100
This plugin however offers a way to aggregate the data by either `hour`, `day`, or `sourceAndDay`,
99
101
the latter will enable you to read daily data per source (Fitbit, Nike Run Club, manual entry, etc).
100
102
103
+
If you didn't run `requestAuthorization` before running `query`,
104
+
the plugin will run `requestAuthorization` for you (for the requested `dataType`). You're welcome. 😉
0 commit comments