google-fit

Getting list of activities(Movements) from google fit api

女生的网名这么多〃 提交于 2019-12-19 03:37:23
问题 I am creating application which can use google fit api. I want to get all the activities(Movements) available in the google fit. Here the list of activities in google fit Reference. Edited I know the way how to get the activities which performed by user, But i want complete list of activities which available in the google fit API (Not only the activity which performed by user, need whole list of activities) like the list available in the above link. 回答1: The Google Fit activities are listed

Google Fit API, getting calories burned per activity

这一生的挚爱 提交于 2019-12-19 02:37:10
问题 So I'm trying to create an app that connects to Google Fit and shows the user their data in a pretty streamlined way and I'm having trouble finding the calories the user burned for each individual activity per day. I can get the total calories for the entire day, and each activity the user did each day, but not the calories burned for each activity. Link to GitHub: https://github.com/drb56/FitTest I've only added the java code not any of the xml stuff. And the Google Fit code is in the

How is it possible that Google Fit app measures number of steps all the time without draining battery?

倾然丶 夕夏残阳落幕 提交于 2019-12-18 10:44:44
问题 The Google Fit app, when installed, measures the duration you are walking or running, and also the number of steps all the time . However, strangely, using it does not seem to drain the battery. Other apps like Moves which seems to record number of steps pretty accurately declares that it uses a lot of power because of it constantly monitoring the GPS and the accelerometer. I imagine several possibilities: Wakes up the phone every minute or so, then analyses the sensors for a few seconds and

Unable to Connect To GoogleFit

三世轮回 提交于 2019-12-18 09:22:11
问题 I am trying to connect to Googlefit but i am getting a strange error code as below E/GooglePlayServicesUtil﹕ Unexpected error code 5005 Does anybody have any idea about this.Thanks In advance 回答1: I solved the error with the help of the answer in this post: https://stackoverflow.com/a/28391583/2977169 @Sumoanand: I also faced similar problem. This issue occurs if app is not registered properly in google developer console. I think you have registered app on Google developer Console using

Google fit Recording API delay

对着背影说爱祢 提交于 2019-12-18 08:56:41
问题 So I'm writing a fitness application for android. I'm using the Google fit API to count the steps. I'm using the Recording API to count the steps when the app is in the background. Once the app is in the foreground I'm fetching the steps count with the History API to show it on the screen. What happens is that the count is not correct. There is a delay until you get the correct and updated count. To be more specific no data is being lost. I guess that the Recording API is updating with a

Getting error in google fit “Connection failed. Cause: ConnectionResult{statusCode=unknown status code 5005, resolution=null}”

被刻印的时光 ゝ 提交于 2019-12-18 08:46:08
问题 I have tried to develop application using google fit. I follow This link When i try to run that application i got the following error 10-27 11:55:19.966: I/Google Fit(6016): Connection failed. Cause: ConnectionResult{statusCode=unknown status code 5005, resolution=null} 10-27 11:55:19.966: E/GooglePlayServicesUtil(6016): Unexpected error code 5005 回答1: Finally i found that issues. We need to save the content in consent screen under oath and api 回答2: I had this error and the consent screen had

Calories expenditure using google fit api

瘦欲@ 提交于 2019-12-14 03:42:12
问题 I am working on app fitness app , for that I used google fit api . Till now I am successful in fetching steps count , distance but I am unable to get calorie expenditure . Thanks in Advance 回答1: You need to set the user's weight and height first. The expended calories are calculated using this information. These are the methods that I use to do this. (mClient is a GoogleApiClient instance) public static void saveUserHeight(int heightCentimiters) { // to post data float height = ((float)

Unable to read data through Google Fit History API in services when app is in background or is killed?

删除回忆录丶 提交于 2019-12-14 02:50:14
问题 I am using History API of Google Fit to get the step count into my app. I have run a service and the step count is updated after a regular interval. When my app is in foreground, it works fine and I get the step count but when my app goes background, services works fine and Fitness.HistoryApi.readData does not fetch the steps. I require the steps count even when the app is in background or even when the app is killed. Here is my problem code snippet: private class InsertAndVerifyDataTask

Android + Google Fit Data Upload : error 5002 - DataType's name does not match package name

泪湿孤枕 提交于 2019-12-13 12:29:27
问题 In an app we upload user activity data to Google Fit like this : Fitness.getSessionsClient(context, GoogleSignIn.getLastSignedInAccount(context)) .insertSession(((SessionInsertRequest) object)) .addOnSuccessListener(new OnSuccessListener<Void>() { @Override public void onSuccess(Void aVoid) { // At this point, the session has been inserted and can be read. if (BuildConfig.DEBUG) { Log.i(TAG, "Session insert was successful!"); } //more success handling } }) .addOnFailureListener(new

Google fitness sensors: onDataPoint not being called

妖精的绣舞 提交于 2019-12-13 06:49:46
问题 I'm creating an app that tracks a user's steps using the google fit API. I've been stuck on getting the onDataPoint method to be called more than once. My code is almost the exact copy of the google-fit sample code, except with location replaced by steps. The sample code is found here. It's very similar to the code I am testing out with, with a small adjustment. Here is my code. Any help would be greatly appreciated, I looked all over and couldn't find a solution. private void