Skip to content

Commit 369a751

Browse files
fix dox
1 parent 4451478 commit 369a751

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

docs/FAQ.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ syntax and src/scopes.js or official Google Fit documentation with available sco
2626
// The list of available scopes inside of src/scopes.js file
2727
const options = {
2828
scopes: [
29-
Scopes.FITNESS_ACTIVITY_READ_WRITE,
30-
Scopes.FITNESS_BODY_READ_WRITE,
29+
Scopes.FITNESS_ACTIVITY_WRITE,
30+
Scopes.FITNESS_BODY_WRITE,
3131
],
3232
}
3333
GoogleFit.authorize(options)

docs/INSTALLATION.md

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Another step is to configure the consent screen, etc.
1111
More detailed info available at
1212
https://developers.google.com/fit/android/get-api-key
1313

14+
1415
```
1516
1. In order for the library to work correctly, you'll need following SDK setups:
1617
@@ -55,3 +56,6 @@ _**Note**: Do not change BuildConfig.APPLICATION_ID - it's a constant value._
5556
compile project(':react-native-google-fit')
5657
```
5758

59+
60+
**Note**: If you are using the recording API for location/ distance data, you have to [request](https://developer.android.com/training/location/permissions) the `location-permission` in your app's `AndroidManifest.xml`:
61+
`<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />`

index.android.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class RNGoogleFit {
4141

4242
const defaultScopes = [
4343
Scopes.FITNESS_ACTIVITY_READ,
44-
Scopes.FITNESS_BODY_READ_WRITE,
44+
Scopes.FITNESS_BODY_WRITE,
4545
Scopes.FITNESS_LOCATION_READ,
4646
]
4747

@@ -189,7 +189,7 @@ class RNGoogleFit {
189189
obj.steps = buildDailySteps(dev.steps)
190190
obj.rawSteps = dev.steps
191191
return obj
192-
}, this);
192+
}, this);
193193
}else{
194194
//simply return raw result for better debugging;
195195
return data;
@@ -247,7 +247,7 @@ class RNGoogleFit {
247247
bucketInterval,
248248
bucketUnit
249249
);
250-
250+
251251
return result;
252252
}
253253

@@ -317,9 +317,9 @@ class RNGoogleFit {
317317
const { startDate, endDate, bucketInterval, bucketUnit } = prepareInput(options);
318318

319319
const raw_result = await googleFit.getWeightSamples(
320-
startDate,
321-
endDate,
322-
bucketInterval,
320+
startDate,
321+
endDate,
322+
bucketInterval,
323323
bucketUnit
324324
);
325325

0 commit comments

Comments
 (0)