google-fit

google fit sdk running distance

天涯浪子 提交于 2019-12-23 21:50:28
问题 I am trying to find the distance the user has runned using the Google Fit SDK. Currently i am using this piece of code DataReadRequest readRequest = new DataReadRequest.Builder().aggregate(DataType.TYPE_DISTANCE_DELTA, DataType.AGGREGATE_DISTANCE_DELTA) .bucketByTime(1, TimeUnit.DAYS) .setTimeRange(mStartTime, mEndTime, TimeUnit.MILLISECONDS) .build(); It's working fine except that it returns the distance travelled by the user no matter what way ( by car, airplane, etc...) How do i filter it

Read weight from google fit

送分小仙女□ 提交于 2019-12-23 05:24:04
问题 I can't read a weight from Google Fit. When I make request to Google Fit for weight I get only name of weight field (weight) but DataPoints size is 0. What is wrong? code: DataReadRequest dataReadRequest = queryFitnessData(); DataReadResult dataReadResult = Fitness.HistoryApi.readData(getApiClient(), dataReadRequest) .await(1000, TimeUnit.MILLISECONDS); //////// private static DataReadRequest queryFitnessData() { Calendar calendar = Calendar.getInstance(); Date date = new Date(); calendar

Reading other user's Google Fit data via REST API

邮差的信 提交于 2019-12-23 04:56:44
问题 We have a user who gave consent for our Cloud Project to read their Fit data through the Android app. We now want user's coach to access their Fit data through a web UI associated with our Cloud Project. Is this possible, and if so, what is the right way to do it? Can cross-client identity be used? https://developers.google.com/identity/protocols/CrossClientAuth I was trying to replace "me" with "user@gmail.com" in the REST endpoint but it doesn't work: https://www.googleapis.com/fitness/v1

Google Fit Android API Acitivity Time?

南笙酒味 提交于 2019-12-23 04:43:56
问题 I am currently using the Google Fit Android API to access step count data within my application. On the Google fit android app it has a value for active time Attached image of the value I am trying to access I have tried numerous ways to access this data within my app but I can't figure out which of the instantaneous data types I should be using ? or if I'm completely wrong and need to try something different? Any help would be greatly appreciated. Thanks 回答1: I had the same doubt and I used

Steps Count using sensor with google fit

微笑、不失礼 提交于 2019-12-23 04:33:32
问题 I am using Google health kit in my application . I know that Health kit doesn't provide the Sensor Steps Count directly .I read the google fit Documentation And i found that we can use Recording api for Step Count in background . So if it is possible to use Recording api and Sensor api To get the step Counts in background ,Please Tell me how to achieve this. I Want to sense the user activity and how many steps user took during that activity in background . Any help Would be appreciated . As

Android Google Fit example is not working

╄→尐↘猪︶ㄣ 提交于 2019-12-23 03:41:13
问题 I have problems to get the example apps for Google Fit running provided by Google. I figured out so far, that the resultCode I get in onActivityResult is 0 after I selected an Account . The example app I use at the moment is BasicRecordingApi , which can be found here. But I've tried the others too. I created an API key for the app and I enabled Google Fit API already. Nothing helps. Any ideas? 回答1: Getting Started on Android This explains how to start developing with Google Fit on Android.

Is there Google Fit REST API for reading Blood Pressure data?

心不动则不痛 提交于 2019-12-22 09:58:19
问题 Google documentation mentions about specifically writing Blood Pressure data: https://developers.google.com/fit/scenarios/write-bp-data But it does not mention URL to be used for REST API to read Blood Pressure data? Is that Health data (Blood Pressure, Blood Glucose...) is not accessible via REST API and it is only limited to Fitness data (Calories, Steps, Distance...) I was hopeful that REST API would be available for reading Blood Pressure so that I can try it out in OAuth Playground on

Google Fit API Activity History

家住魔仙堡 提交于 2019-12-20 04:18:04
问题 I have an app that integrates with Google Fit. One of the requirements is display a users favorite activity (most frequent) i.e.: bicycling. I assume it would be done through the History API, but I'm not sure how to gather all activities so I can calculate the most common one. Anybody have any idea how to go about doing that? 回答1: You can check this documentation: Work with the Fitness History to get most frequent activity of the user. First, you need to read data from the fitness history by

Fetching Google Fit Data into android application

六月ゝ 毕业季﹏ 提交于 2019-12-19 09:21:58
问题 How can we get the data stored in google fit cloud for a specific user? I tried using History API but no data is being displayed. Then i tried entering some data vai History api, now I could see these data only via history api not the complete data that actually resides in fit. DataReadRequest readRequest = queryFitnessData(); DataReadResult dataReadResult = Fitness.HistoryApi.readData(mClient, readRequest).await(1, TimeUnit.MINUTES); Data Request is DataReadRequest readRequest = new

Android Google Fit onConnectionFailed() SIGN_IN_REQUIRED

*爱你&永不变心* 提交于 2019-12-19 07:43:47
问题 I can't seem to get round this issue. I just cannot sign in. I'm running the BasicSensorApi sample file and it just will not connect. It seems i'm getting RESULT_CANCELED even though i select an account on the dialog? Here is the end of my logcat running on a OnePlus One 4.4. Any ideas on what i need to do? (The Google console is set up with 'net.xx', correct SHA1, Fitness APi enabled. 01-26 15:54:06.838 15678-15678/net.xx D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002 01-26 15:54:06.888