OvalMoney / react-native-fitness

A React Native module to interact with Apple Healthkit and Google Fit.
MIT License
345 stars 68 forks source link

Subscribe to Google Fit Activity #6

Closed ibraude closed 5 years ago

ibraude commented 5 years ago

I noticed that I must have Google Fit on my device to record activity.

I wanted to have the module record activity even if the device does not have Google Fit installed, so I added a subscribe function that writes user activity to the Google Fit Store.

It should be initialized when loading the app via Fitness.subscribe(), it returns a promise to show the status of the subscription (true for success and false for failure).

scerelli commented 5 years ago

@ibraude it seems nice to me, can you also update the docs with the new methods? so we can test and merge this.

Thanks

ibraude commented 5 years ago

@scerelli Will do.