stasonis / fitbit-api-example-android Goto Github PK
View Code? Open in Web Editor NEWA sample Fitbit API app for Android
A sample Fitbit API app for Android
Is it possible to create more detailed documentation so that it can be easier for beginners to implement the application themselves?
hello
Calories count from calorie out ie lifetimeTotal.getCaloriesOut() is returning -1 .
I have successfully included the authentication libraries into my application however I am confused how I can use the data after I have logged in.
I am trying to run this sample to authenticate FitBit account and trying to get token. I need to authenticate in my Android app. Just need token.
When I tap to Login button that navigates me to Login Screen but before providing credentials, a dialog appears that shows some SSL error.
Quick response will be much appreciated.
Thanks
When trying to compile i get:
A problem occurred configuring project ':app'.
Failed to notify project evaluation listener.
javax/xml/bind/annotation/XmlSchema
Steps
Issue
Note-
as per the fitbit api use of webview is prohibited. check this link https://dev.fitbit.com/reference/web-api/oauth2/
they will likely ban your app if you use this method.
whenever i try to login its showing the following error
Google can’t sign you in safely inside this app. You can use Google sign-in by visiting this app’s website in a browser like Safari or Chrome.
I am getting this error internally
net::ERR_NAME_NOT_RESOLVED
Many of the dependencies don't work any more. tried to build the app but it kept failing. currently updated SDK version to 27 but no fix yet. Is there an apk I can install?
Please consider publishing the libraries in a public repository like jcenter or maven central.
I've tried to modify the bindActivityData function to return the step value for a particular day. I've tried the following:
Steps_ daily = activities.getBest().getTracker().getSteps();
daily.setDate("2016-12-18");
Integer dailySteps = daily.getValue();
I've also tried using tracker vs tracker_ and lifetime vs best to try and get different step values, but I am only able to get the number of steps for the first day w/ step values for a given fitbit account.
When I Applications I registered in https://dev.fitbit.com, Client Secret is nulll
兄弟,你这个版本有点老了,有2020版的不
Is there any suggestions for fixing this deprecation in the RootActivity? I have tried looking into the new methods using ActivityResultLauncher but have not been able to get anything to work. Any help is appreciated.
Please add a license to let others know what they are allowed to do with this library.
Hello,
I am unable to get profile,settings,activity,weight data.
Token is generated but not getting data.
Any help will be appreciated.
Thanks
Hi friends, did anyone know what's the fatal bug in the UserDataActivity? Whenever I open the ACTIVITY page, the app was forced to stop. The log of the error is as follows. Could you give me some hints to debug it? Thanks.
02-28 09:31:00.719 701-915/? V/AudioPolicyEffects: releaseOutputSessionEffects: no output processing was attached to this stream 02-28 09:31:00.760 15414-15414/com.fitbit.sampleandroidoauth2 D/AndroidRuntime: Shutting down VM 02-28 09:31:00.761 15414-15414/com.fitbit.sampleandroidoauth2 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.fitbit.sampleandroidoauth2, PID: 15414 java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 at com.fitbit.sampleandroidoauth2.fragments.WeightLogFragment.bindWeightLogs(WeightLogFragment.java:78) at com.fitbit.sampleandroidoauth2.fragments.WeightLogFragment.onLoadFinished(WeightLogFragment.java:59) at com.fitbit.sampleandroidoauth2.fragments.WeightLogFragment.onLoadFinished(WeightLogFragment.java:27) at android.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:489) at android.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:457) at android.content.Loader.deliverResult(Loader.java:144) at android.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:265) at android.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:92) at android.os.AsyncTask.finish(AsyncTask.java:667) at android.os.AsyncTask.-wrap1(AsyncTask.java) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6121) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) 02-28 09:31:00.763 1555-4043/? W/ActivityManager: Force finishing activity com.fitbit.sampleandroidoauth2/.UserDataActivity 02-28 09:31:00.766 1555-4043/? D/ActivityTrigger: ActivityTrigger activityPauseTrigger
git diff
diff --git a/SampleAndroidOAuth2/app/build.gradle b/SampleAndroidOAuth2/app/build.gradle
index 34c11d7..1848cbc 100644
--- a/SampleAndroidOAuth2/app/build.gradle
+++ b/SampleAndroidOAuth2/app/build.gradle
@@ -1,13 +1,13 @@
apply plugin: 'com.android.application'
android {
compileSdkVersion 28 //25
// buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.fitbit.sampleandroidoauth2"
minSdkVersion 16
targetSdkVersion 25
minSdkVersion 18
targetSdkVersion 28
versionCode 1
versionName "1.0"
+/*
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':fitbitapi')
@@ -33,3 +34,16 @@ dependencies {
testCompile 'junit:junit:4.+'
}
+*/
+
+dependencies {
+/*
buildscript {
repositories {
jcenter()
@@ -21,3 +21,23 @@ allprojects {
task clean(type: Delete) {
delete rootProject.buildDir
}
+*/
+buildscript {
jcenter()
google()
classpath 'com.android.tools.build:gradle:3.4.0'
+allprojects {
google()
jcenter()
maven {
url "https://jitpack.io"
}
I also updated the gradle.properties files to
distributionUrl=https://services.gradle.org/distributions/gradle-5.1.1-all.zip
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.