krokyze / FitKit

Flutter plugin for reading health and fitness data. Wraps HealthKit on iOS and GoogleFit on Android.
BSD 2-Clause "Simplified" License
98 stars 72 forks source link

Running example app is extremely difficult #32

Closed HarisSpahija closed 3 years ago

HarisSpahija commented 4 years ago

As someone who is new to using google fit in flutter it is particularly hard to run the example app. A lot is either missing or just wrong such as the dependency of fit_kit in pubspec.yaml

Could there be some more instructions added to the README.md on how to make the example run? Thanks!

@krokyze If you need help feel free to let us know so we can submit a PR

krokyze commented 4 years ago

Hey @HarisSpahija

Could you please name all the issues you had trouble with? Submitting step by step in a PR would definitely help me.

About the dependency then it's correct. You should clone the whole project.

HarisSpahija commented 4 years ago

This was a bit how my process went trying to test the example app

1. I cloned the example folder
2. Flutter run gave me an error that fit_kit was undefined
3. Changed fit_kit in pubspec.yaml
4. Received no data in the example app
5. Had to create a google oAuth2 token
6. Add items to gradle according to the Google Fit instructions
7. Rebuild the app
8. Finally got the app to work

I think having a simple instructions guide or warning with:

You need to get a oauth2 key before you can run this app. 
Clone the entire project for running the example app etc. 

Having this would already be super helpful for new users for this library.

jaydeep42 commented 4 years ago

@HarisSpahija what items you added in gradle? Because I am still getting 0 in all the data

L3thal14 commented 3 years ago

@jaydeep42 Just add google-services.json with oauth2 ID generated and in build.gradle under dependencies add these 2: compile 'com.google.android.gms:play-services-fitness:18.0.0' compile 'com.google.android.gms:play-services-auth:17.0.0' Happy Fluttering! :))

gokulp01 commented 3 years ago

@L3thal14 thanks. That worked :)

HarisSpahija commented 3 years ago

I think this issue can be closed with the comments from @L3thal14