google-fit

Difference between Android SensorManager and Google Fit raw sensor data?

安稳与你 提交于 2021-02-19 03:53:10
问题 For my app I need to read the user's latest heart rate to send in every message. One is the Android SensorManager and the other is Google Fit's Sensors. Also there is Samsung's Health app (don't think this one will give me the data I need as I don't need past data unless I just query it for the latest heart rate). What is the difference between these methods of accessing the user's heart rate? Is one better than the other for my purposes? Or are they all the same? https://developer.android

OAuth consent screen blank in android app with Google Fit

佐手、 提交于 2021-02-18 03:39:08
问题 I'm trying to use the Google Fit API in my application, after the user is prompted to choose a Google account the OAuth consent screen should be displayed, however I only get a blank popup with a indefinite loading indicator, this popup will stay like that unless I cancel it. Image of the popup No error messages are displayed, only if I cancel the sign-in flow I would get an error that I cancelled it. I have tried on a personal proyect as well as with Google's sample proyect, where other

Accessing weight data via the Google Fit REST API

ぃ、小莉子 提交于 2021-02-07 13:37:49
问题 For the last 6 months I've been entering my weight into Google Fit, I now want to get my data out. Accessing the Google Fit REST API hasn't been an issue. Finding my weight data amongst the all the accessible data has stumped me however. Any pointers gratefully appreciated. 回答1: I can get all weight data I found API request for all weight data https://www.googleapis.com/fitness/v1/users/me/dataSources/derived:com.google.weight:com.google.android.gms:merge_weight/datasets/0-1443194884000000000

Accessing weight data via the Google Fit REST API

你说的曾经没有我的故事 提交于 2021-02-07 13:37:43
问题 For the last 6 months I've been entering my weight into Google Fit, I now want to get my data out. Accessing the Google Fit REST API hasn't been an issue. Finding my weight data amongst the all the accessible data has stumped me however. Any pointers gratefully appreciated. 回答1: I can get all weight data I found API request for all weight data https://www.googleapis.com/fitness/v1/users/me/dataSources/derived:com.google.weight:com.google.android.gms:merge_weight/datasets/0-1443194884000000000

How to get steps count with Google Fit api in php ?

你说的曾经没有我的故事 提交于 2021-02-07 08:51:46
问题 I got a problem with the Google Api Php Client and Google Fit . I want to get the sum of steps I made in a day. I found a response but it doesn't work (look at the gist). My php code: // Retrive oauth data $clientData = json_decode(file_get_contents("../Devbook-87e2bafd84e6.json")); $client_email = $clientData->client_email; $private_key = $clientData->private_key; $scopes = array(Google_Service_Fitness::FITNESS_ACTIVITY_READ); $credentials = new Google_Auth_AssertionCredentials( $client

How to get steps count with Google Fit api in php ?

自古美人都是妖i 提交于 2021-02-07 08:48:36
问题 I got a problem with the Google Api Php Client and Google Fit . I want to get the sum of steps I made in a day. I found a response but it doesn't work (look at the gist). My php code: // Retrive oauth data $clientData = json_decode(file_get_contents("../Devbook-87e2bafd84e6.json")); $client_email = $clientData->client_email; $private_key = $clientData->private_key; $scopes = array(Google_Service_Fitness::FITNESS_ACTIVITY_READ); $credentials = new Google_Auth_AssertionCredentials( $client

runtime error while accessing google api in android emulator

心已入冬 提交于 2021-02-05 09:27:16
问题 I am trying to access the googleFit API. It seems pretty straightforward. Get the google sign-in permissions and required authorizations then query for Step count. My code doesn't seem to work. When I debug this the fitnessOption declaration part throws "source code doesn't match byte code" error. I cleaned my project, rebuild it it didn't work Android gurus, Where am I going wrong?? fun getAuthorizationAndReadData() { try { MainActivity().fitSignIn(FitActionRequestCode.READ_DATA) } catch ()

Google FIT Rest API Get Sessions

荒凉一梦 提交于 2021-01-28 12:10:31
问题 I'm trying to get sessions from a startDate to a EndDate, but every time i try return always a empty record HTTP/1.1 200 OK Content-length: 3 X-xss-protection: 1; mode=block Content-location: https://www.googleapis.com/fitness/v1/users/me/sessions?startTime=2015-11-20T00:00:00.00Z&endTime=2015-11-30T23:59:59.99Z X-content-type-options: nosniff Expires: Fri, 01 Jan 1990 00:00:00 GMT Vary: Origin,X-Origin Server: GSE Etag: "" Pragma: no-cache Cache-control: no-cache, no-store, max-age=0, must

Google Fitness: Dealing with TransactionTooLargeException without feedback

冷暖自知 提交于 2021-01-28 01:08:04
问题 I'm building an application integrating with Google Fit via the local (not REST) Google Fit API. I'm using Flutter 1.2.1, Kotlin 1.3.21, com.google.android.gms:play-services-fitness:16.0.1 and running the app on Android 8.1.0 with Google Play Services 16.0.89. Some HistoryClient.readData() requests disappear without any feedback (no calls to onSuccessListener, onCancelledListener, onFailureListener, onCompleteListener callbacks), and at these times I can see in the logs: W/Fitness: Error

Is there a way to read daily resting heart rate from the Google Fit API?

只愿长相守 提交于 2021-01-02 07:31:31
问题 The iOS Google Fit app shows Resting Heart Rate as one of it's metrics (I have not seen it in the Android Google Fit app, however). I would like to show Resting Heart Rate in an Android app using Google Fit Data. However, the Android Google Fit API does not seem to present this data. I have tried a read request both by DataType.TYPE_HEART_RATE_BPM and by aggregating DataType.TYPE_HEART_RATE_BPM and DataType.AGGREGATE_HEART_RATE_SUMMARY as shown here: DataReadRequest.Builder() .aggregate