How to debug Google Fit data? - google-api

I've been sending a ton of data to the Google Fit API for a workout being performed by the user, but none of the data is showing up in the app anywhere and I'm not sure how to tell what is wrong. The data is accepted by the API, but none of it is showing up in the user's profile in the app. Does anyone have a strategy for telling if all the different data sets are being connected correctly?
I've been trying for over a year to find someone who works with the Google Fit team to help answer some questions, but I have not been able to find anyone. It seems like the app only wants to show steps, so all the actual workout data that I'm sending it might just be ignored?

Related

Graph API (#4) Application request limit reached | Facebook comments plugin how get all comments from application with one request

Friends I know there are 2 similar questions in StackOverflow. I know that
this is not Facebook forums. So Before Starting to write any (bad)
comment, please read the question. I need help, that's why I'm writing
here, maybe somebody knows the answer.
I have website where I connected Facebook comment plugin to let users comment each publciation. Now I need to sync comments count to my database. I know that I can subscribe to Facebook events, but that solution do not fit my needs.
I wrote a command in Laravel to make it. For each publication I request Graph API with this url
https://graph.facebook.com/v6.0/$articleUrl?fields=engagement&access_token=$appId|$appSecret
to get that count and sync data to DB. Cause I have many publications after some requests I start to get this message
(#4) Application request limit reached
Now the question: Is there any way to avoid this limitation OR to get all publications' comments in one request?
I was trying to find solution for some 2 hours and all old similar questions in StackOverflow didn't help me, I found nothing in Graph API documentation.

using google classroom api to change course ownerId

How? Easiest method?
Tried using postman on desktop, googles OAuth2 playground and google help pages to try make sense of what to do. Ended up using GAM as this is the easiest and gives the most helpful responses.
I have tried changing this from multiple places and i always get the error:
ERROR: 400: #UserInIllegalDomain Invitation cannot be created for user in this domain - failedPrecondition
the command:
gam update course 8077159861 owner hiddenusername#longleypark.ac.uk
(username is DEFINITELY correct ive just hidden it as its not vital information)
Any help would be much appreciated, from what i can tell some guides said to add longleypark.ac.uk to whitelisted domain under classroom but because this is the primary domain for this g suite it says you cant add your current domain so this isnt an option.
I believe the google API is broken. If anyone can prove otherwise would be a great help.
Google API support haven't managed to give me any proper response, keep saying they will test and let me know but I haven't been informed of any results yet.
Google forums support has informed me once a user account is deleted and 20 days have passed the account becomes unrecoverable which means any classrooms they are the owner of become "orphans" which means "limited functionality" and the inability to change the owner ever again, the only solution is to recreate the classroom from scratch, unfortunately along with the original account all the documents submitted to that classroom are also lost.
There are NO ways around this even though the ownerId field for a classroom really should be editable from some sort of database management tool or admin console/API.
I have run into this problem today. Thought using the API I'd be able to swap the ownerId, but no.
Bizarre that Google don't let you do this as a Google Workspace admin. We know have 3 GCSE sets which are unusable with 3 months of the 2 year course left. Very frustrating.

Parse AppOpened event track push notification consumption via Rest API

I'm trying to track an AppOpened event via Parse.com's Rest API, specifically related to the consumption of a push notification via a POST to https://api.parse.com/1/events/AppOpened
Since there's really no documentation on doing this, I was hoping adding a "push_hash" key inside the data sent to Parse would be enough, but I guess I'm just not that lucky.
Does anyone know what the required data for tracking push consumption via an AppOpened event is? I couldn't find anything online and was really hoping someone here could help (especially considering every support page they have points here).
Thanks~
You are right, there poor documentation but from other hands some people already meet this issue. And you can check their code for your situation:
Setting up a App Opened event
App-Open Analytic
Track App Opens with JavaScript
Try to use anything from this (use app & REST keys) and describe your result more detailed.

Unable to get exact steps as shown on Google fit app

I tried all sources listed in Datasource api of google fit.
However, I was unable to get exact match for number of steps shown on fit app.
The response returned by APIs is cumbersome to use. Could have been more specific as in which API to be used when. Also, i walked 91 steps 15 mins before. However, still I am not able to get that data after making API request. It just shows stale data. Not sure if it supports realtime. I am having excellent wifi connection, but seems data has not yet been uploaded to google cloud. Fit app does how 91 steps though.
Following is my api request:
GET /fitness/v1/users/me/dataSources/derived:com.google.step_count.delta:com.google.android.gms:estimated_steps/datasets/1429848000000000000-1429906530000000000 HTTP/1.1
Summation of the result does not match data displayed for todays steps on Google Fit App
In google doc. said
To record fitness data, use the Recording API to create a subscription for each data type you want to record.
Use Fitness.RecordingApi.subscribe to subscribe data. Then use Fitness.HistoryApi.readData or Fitness.HistoryApi.readDailyTotal to read.
Or you can use Sensor API to monitor step change.
I had the same issue and ended up solving it by implementing in this way.
https://developers.google.com/fit/faq#how_do_i_get_the_same_step_count_as_the_google_fit_app

How do you acquire usage data from a webOS app and store that data remotely?

I am new to webOS development. I have one app in the app store and in the next update to the app I would like to be able to identify the age of users, their location, how long they use the app, which features they use the most/least and then store that data in a database. How do I do this? Many thanks in advance for your help.
Well, that's a pretty big question. Here's an outline of what to do, with some notes.
First, you're probably not going to be able to get age unless you ask the user directly and they tell you. Also, you're only going to get location if the application is location-aware and the user permits you to collect that data (when you install a location-aware application, it asks the user if they're okay with the fact that the application will be able to get their location).
As for how long they use the app and which features they use, that's easier. Depending on the granularity you need/want to capture, you can just record time stamps when a user starts and stops using a particular feature, such as when scene activate and deactivate methods fire. As long as you store feature name and timestamp, that should give you what you're looking for.
Then comes to question of collection. However you store it in the app, you have a couple of choices for how to get it out of the app. Unless you can get your users to just email the data to you, probably the easiest thing to do would be to create a web app (possibly with no user facing output, since you're just using it to collect data) using something like Google App Engine that gives you a URL you can send a POST request to using an HTTP request. Depending on how you set it up, it could do the request every time you collect a timestamp (bad for battery use, though), just occasionally, or only when the app is doing cleanup (possibly a problem if you don't get the request off in time).
I'd recommend taking a look online at how people do this type of thing in iPhone apps to get a good sense of how to do this type of thing. If you hit problems getting particular things to work, you can of course come here to StackOverflow with specific coding questions.

Resources