Comments (9)
Can you share some of your code where you use this library?
from react-native-google-fit.
@reboss any updates?
from react-native-google-fit.
Hey, sorry for the late reply. Yes, I think the problem described above was due to a conflict in our gradle configs. I was compiling a different version of the Google Fit SDK than this package was. It's all fixed now though.
I did some more research into the Google Fit SDK and have found that in order to get fitness tracking to work without having the app itself installed, you have to initialize the Recording API. Then you can read fitness history without having any third party apps.
I got this working in the app that I'm developing using React's Native Modules, similarly to how this package was built. I'm hoping to make a PR in the next week or two if you guys are willing to look at it?
from react-native-google-fit.
@reboss Hey! That would be awesome! Thanks!
from react-native-google-fit.
@reboss hey any updates? Maybe I can help you to move this functionality to production? It should be a really big step forward :)
from react-native-google-fit.
Hey @StasDoskalenko, I added the basic Recording API functionality in my fork if you want to take a look. I still need to test it and I wanted to add a little bit more functionality like allowing an array of fitness types to subscribe to to be passed as parameters to startFitnessRecording()
and also adding some event handlers similar to how the authorize()
function is set up.
from react-native-google-fit.
If you want, I'll make a PR as soon as I get a chance to test it, although I'm going to a Hackathon this weekend so I should be able to complete everything then :)
from react-native-google-fit.
@reboss sure thanks!
from react-native-google-fit.
@reboss hey! I've just merged your PR and added some changes. For example, I've added listeners directly to the lib. Because many of guys using this lib are using callbacks and it's more easy to them. You did a great job, thanks!
startRecording(callback) {
googleFit.startFitnessRecording();
DeviceEventEmitter.addListener(
'STEP_RECORDING',
(steps) => callback(steps));
DeviceEventEmitter.addListener(
'DISTANCE_RECORDING',
(distance) => callback(distance));
// TODO: add mote activity listeners
}
from react-native-google-fit.
Related Issues (20)
- isAvailable() doesn't work on Android 11+ without change to AndroidManifest.xml HOT 1
- getDailySteps returns empty array HOT 3
- passing callback to `observeSteps` causes crash HOT 6
- Running the react-native google fit with background fetch crashes the app HOT 1
- Data for users who never used Google Fit HOT 3
- Authorize Issue in bundle release HOT 6
- GoogleFit.getXXXSamples(options) returns with no data HOT 1
- Using new GoogleSignInClient
- I want to retrieve information about connected users.
- How to get Read Sleep Data by sessions of type sleep as Document HOT 4
- GoogleFit.disconnect() not working
- App crash on bundleRelease - java.lang.IllegalStateException
- How to allow access to our react native mobile app without mandatory Google OAuth sign in blocking users progressing (is it possible to easily skip)? HOT 3
- Not working in release or debug in .aab extention HOT 12
- Firebase Error: Attempt to invoke virtual method 'java.lang.String java.lang.String.to LowerCase()'on a null object reference HOT 1
- Missing source information for some datatypes
- Google Fit Sync working in prod apk but not in Playstore build (With firebase) HOT 1
- Could not find method compile() for arguments
- Distance missing from Save workout HOT 1
- How could I get the steps data from Headless?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-google-fit.