google-fit

Android Google Fit Unable to Read Blood Pressure Value

穿精又带淫゛_ 提交于 2020-01-21 09:17:09
问题 I have tried to read Blood pressure value from Google Fit using Android code but unable to read value and returns the below logs Blood Pressure Log: Number of returned buckets of DataSets is: 1 Datasets: [DataSet{d:blood_pressure.summary:gms:aggregated []}] Name: com.google.blood_pressure.summary Fields: [blood_pressure_systolic_average(f),blood_pressure_systolic_max(f), blood_pressure_systolic_min(f), blood_pressure_diastolic_average(f), blood_pressure_diastolic_max(f), blood_pressure

How to get Sleep data from Google Fit

梦想的初衷 提交于 2020-01-20 09:36:06
问题 I want to get sleep data of previous day from Google Fit between 7pm(start time) to 11am(end time). Using following code I get the data after midnight. For example if Google fit has sleep time 10pm and wake up time 6am; I get it as 12am to 6am. So I don't get the sleep data before midnight. Please tell me what time should I set as start time. Here is my AsyncTask : private class InsertAndVerifyDataTask extends AsyncTask<Void, Void, Void> { @Override protected void onPreExecute() {

How to get Sleep data from Google Fit

橙三吉。 提交于 2020-01-20 09:32:28
问题 I want to get sleep data of previous day from Google Fit between 7pm(start time) to 11am(end time). Using following code I get the data after midnight. For example if Google fit has sleep time 10pm and wake up time 6am; I get it as 12am to 6am. So I don't get the sleep data before midnight. Please tell me what time should I set as start time. Here is my AsyncTask : private class InsertAndVerifyDataTask extends AsyncTask<Void, Void, Void> { @Override protected void onPreExecute() {

Fitness getSensorsClient Can not read TYPE_ACTIVITY_SEGMENT real time data

久未见 提交于 2020-01-16 14:04:28
问题 Objective - Get continuous call back of activity (like - walking, running, etc. data) , read the real data for activities. I can read real time data for TYPE_LOCATION_SAMPLE for same code as below just changing to TYPE_ACTIVITY_SEGMENT. i can not read the real data for activities like - walking, running, etc. Example - https://developers.google.com/fit/rest/v1/reference/activity-types [Google fit - Read using getSensorsClient] Read Example - Walking* 7 Walking (fitness) 93 Following - https:/

How to disable Google Fit and revoke permissions from the app itself

蓝咒 提交于 2020-01-14 07:42:07
问题 I've setup app that connects to Google Fit, reads and writes some data about users body. When user disables Google Fit in apps settings, I try to revoke my apps permissions for by calling: public void disableGoogleFit(){ if(!mClient.isConnected()){ Log.e(TAG, "Google Fit wasn't connected"); return; } PendingResult<Status> pendingResult = Fitness.ConfigApi.disableFit(mClient); pendingResult.setResultCallback(new ResultCallback<Status>() { @Override public void onResult(Status status) { if

Google Fit Api filter manually added activities

走远了吗. 提交于 2020-01-11 07:37:09
问题 Google Fit allows users to add activities manually and programatically. Is it possible to filter out manually or programtically added activities from either the Android Api or the REST Api? I want to query for only activities that were actually tracked and recorded at the time they were performed. 回答1: There is no proper way according to the documentation. But I found some solution to identify manual and automatic tracked activities in Android API. DataSource ds = DataPoint

How do I retrieve step count data from Google Fitness REST api?

╄→尐↘猪︶ㄣ 提交于 2020-01-10 02:48:12
问题 Since I installed the Google Fit app on my Nexus 5 it has been tracking my step count and time spent walking. I'd like to retrieve this info via the Google Fitness REST api (docs) but I can't work out how to get any of that data from the REST api. I've used the OAuth 2.0 playground to successfully list dataSources but none of the examples I have tried have returned any fitness data whatsoever. I feel like I need to use something similar to a DataReadRequest from the (Android SDK) but I'm not

Can't get heart rate data from google fit API with smartband 2

有些话、适合烂在心里 提交于 2020-01-05 10:34:52
问题 I'm trying to use google Fit API to get heartrate from sony smartband2. Problem is, I don't get any readings(i.e. onDataPoint method is not called). Heart Rate sensor is being found properly, whole code also is working properly if I try to look for step data. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (savedInstanceState != null) { authInProgress = savedInstanceState.getBoolean(AUTH_PENDING); } mApiClient

GoogleApiClient not connecting while using google fit

天大地大妈咪最大 提交于 2020-01-04 06:15:11
问题 I am trying to get the data for number of steps walked using google fit. I am implementing the code from this tutorial. I am being asked for the account from which I want to connect google fit. After I select the account, it is not connecting. After I select the account, onActivityResult is called but mApiClient.isConnecting() && mApiClient.isConnected() are both false and resultCode == RESULT_CANCELED . Hence, the next alert dialog for requesting permission to access fit data is not being

Steps Data receive from History api is not matched with google fit

*爱你&永不变心* 提交于 2020-01-03 03:20:08
问题 I want google fit steps count in my application, for that I am using History api, provided by google. I found that steps receive from history api is not matched with google fit even if i used same code provided by google. Below is my code. Calendar cal = Calendar.getInstance(); Date now = new Date(); cal.setTime(now); long endTime = cal.getTimeInMillis(); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); long startTime = cal.getTimeInMillis();