I would like to retrieve the data from fitbit api. The data used for my apps is used to build gaming function such as setting the character ability by the data from fitbit. May I know if there is any library or specific tutorial for android application to retrieve the data through oauth2 fitbit api?
I would like to retrieve the data from fitbit api. The data used for my apps is used to build gaming function such as setting the character ability by the data from fitbit. May I know if there is any library or specific tutorial for android application to retrieve the data through oauth2 fitbit api?
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
You should be able to use any generic OAuth 2.0 client library for Android and specify the information for Fitbit's Web API.
This might be useful http://technicalartistry.blogspot.ca/2016/01/fitbit-unity-oauth-2-and-native.html
Can only hope that it will help 😉
Best Answerhttps://developers.google.com/api-client-library/java/google-api-java-client/oauth2
I found the one from google. But it is only for google application only?
Best AnswerAlso, I have try my own using chrome custom tab by a link, it can direct the user to the authentication page, and redirect back to my assigned url. But what to do next? How can I get daily activity summary?
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
You need to make a HTTP request for the data you want.
Here's how to make an OAuth 2 request (add the Authorization header): https://dev.fitbit.com/docs/oauth2/#making-requests
Here's information on the Get Daily Activity Summary endpoint: https://dev.fitbit.com/docs/activity/#get-daily-activity-summary
Best Answerum... this is my another account..
anyway, May I know I would like to to build a apps that
a button for click to get the access token, after the user got authorize the app
Could it not redirect to some webpage but redirect to the app view instead?
Because this is a mobile app but not a web application
Best AnswerCheck this out.
http://technicalartistry.blogspot.ca/2016/01/fitbit-unity-oauth-2-and-native.html
It goes a step further and goes to an app that is made in Unity but you should be able to use the same logic to go to a native android app as well (granted your app is looking for the custom scheme part.)
Best AnswerDid your code using custom tab for the authorization page?
What I want to do is that When I go to authoirzation page it will redirect back and giving a new url in the custom tab which contains the parameter of the access token, I would like to get it programmtically. But I don't know how to get it.
Best Answerbreif my case: Android using custom tab for authoirzation (implicit)
After authorized: go to the redirect back url
the custom tab can show the redirect back url and the parameter with the access_token
I would like to get it from the program, but don't know what to do
After getting the access token I can make request for activity data, that is what I would like to do
Best AnswerThanks for tips about the data:scheme using in android on the reference link
The another issue occured is that after I go to the redirect url from the custom tab in the app.
The application seems closed and go back to the android home page. It seems close but it hide behind the background. I can press and hold the home button and turn it back, but it is not good? How can I fix this issue?
Best Answer