google-fit-sdk

Not cheatable Google fit step counter

拥有回忆 提交于 2019-12-03 21:58:30
i have a question to Google Fit. I am creating a step counter (oh wonder g ). This i have already done so far and it not really hard. But now we come to my problem. I am only reading the steps with the Sensor API. The issue is, i can add new data via for example the Google Fit app and it will be counted in my app too. This introduces cheating and i do not want this. So i need to have a way to only read "device created" data and not manually added data. Is there a nice way to to this? From the SDK documentation it is not really clear how to proceed here. So i need to have a way to only read

Access Android Wear Fit Data

故事扮演 提交于 2019-12-03 06:18:09
I'm developing an app for Android Wear on Samsung Gear Live (Google I/O Edition) where it will need access heart rate and steps count history data. I know that later this data might be accessible using Google Fit SDK , but is it possible to read that data without using that SDK right now? I would prefer to access this data without ROOTing my G Watch. Here are the screenshots of the historical data that I would like to extract: Steps History data: Heart Rate History Data: UPDATE 10/28/2014 Google Release Google Fit SDK Available on the Official website I guess the only option right now is for

Google fit permission problems

本秂侑毒 提交于 2019-12-02 15:41:08
问题 I would like to get some technical help with the google fit rest Rest API. I am making an app that requires access to the location information and as a response for my request I am getting this json. { "access_token": "ya29.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "scope": "https://www.googleapis.com/auth/fitness.activity.read https://www.googleapis.com/auth/fitness.location.write https://www.googleapis.com/auth/fitness.location.read

Google Fit API : Get distance from google fit

人盡茶涼 提交于 2019-12-02 14:28:16
问题 How do I calculate the distance covered by the user using the google fit API? Currently I am using google Fit History Api like this : DataReadRequest readRequest = new DataReadRequest.Builder() .aggregate(DataType.TYPE_DISTANCE_DELTA, DataType.AGGREGATE_DISTANCE_DELTA) .bucketByTime(1, TimeUnit.DAYS) .setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS) .build(); DataReadResult dataReadResult = Fitness.HistoryApi.readData(mGoogleApiClient, readRequest).await(1, TimeUnit.MINUTES); But this

Google fit permission problems

牧云@^-^@ 提交于 2019-12-02 12:46:51
I would like to get some technical help with the google fit rest Rest API. I am making an app that requires access to the location information and as a response for my request I am getting this json. { "access_token": "ya29.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "scope": "https://www.googleapis.com/auth/fitness.activity.read https://www.googleapis.com/auth/fitness.location.write https://www.googleapis.com/auth/fitness.location.read https://www.googleapis.com/auth/fitness.body.read", "token_type": "Bearer", "expires_in": 3600, "refresh

How to differentiate between manual added steps and sensor recorded steps in Google Fit Api

ⅰ亾dé卋堺 提交于 2019-12-02 08:56:05
问题 I am using Google Fit Api in my project to get user's daily steps. But the problem is, user can enter the steps manually by adding the activities. And when i retrieve the daily steps, Google Fit Api also returns the steps which were added manually. Is there any way to differentiate between manually added steps and sensor recorded steps. 回答1: Basically, the example given in the Google Fit documentation states that you can get the base daily steps total of your device by using this method. Your

Google Fit API : Get distance from google fit

为君一笑 提交于 2019-12-02 07:54:53
How do I calculate the distance covered by the user using the google fit API? Currently I am using google Fit History Api like this : DataReadRequest readRequest = new DataReadRequest.Builder() .aggregate(DataType.TYPE_DISTANCE_DELTA, DataType.AGGREGATE_DISTANCE_DELTA) .bucketByTime(1, TimeUnit.DAYS) .setTimeRange(startTime, endTime, TimeUnit.MILLISECONDS) .build(); DataReadResult dataReadResult = Fitness.HistoryApi.readData(mGoogleApiClient, readRequest).await(1, TimeUnit.MINUTES); But this is not returning any value Does anyone a clue? You need to add one more scope when you instantiate

Google Fit API Activity History

自闭症网瘾萝莉.ら 提交于 2019-12-02 06:03:16
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? abielita 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 creating a subscription for each fitness data type you'd like to record. This enables your app to

Getting active time from Google Fit Rest API

久未见 提交于 2019-12-01 18:24:36
I am struggling with matching the "active time" returned by Fit REST API with reality. As an example - on 12/14 I had two walks, about 45 minutes each. The api returns one of them as type 7 ("walking" - right!) and another one as type 0 (in vehicle - wrong!). However, Fit app shows both as "walking", so it apparently uses a different data source. I checked some other days and on these days, the session with type 0 is indeed a valid "in vehicle" session. I tried all aggregated data sources that return com.google.activity.segment. Most of them are empty, I've found data only in merge_activity

Android Google Fit onConnectionFailed() SIGN_IN_REQUIRED

妖精的绣舞 提交于 2019-12-01 04:33:56
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 15678-15678/net.xx I/BasicSensorsApi﹕ Ready 01-26 15:54:06.898 15678-15678/net.xx I/BasicSensorsApi﹕