Comments (5)
you're right, I'll look into it...
from cordova-plugin-health.
The sample in the reference documentation does not work, it uses a method which does not exist in the SDK (getFields(int n)
).
However, there's another way to do it, you can get the Field object from the custom datatype: http://stackoverflow.com/a/27959048/1395437
I'll try to create a pull in the coming days to fix this issue.
from cordova-plugin-health.
the official documentation explains how to create new data types:
https://developers.google.com/fit/android/data-types#custom_data_types
my code didn't follow it 100% because I wanted to have a declaration of the Fields somewhere statically as a reference, but there was no way for creating them (no constructor). Maybe the API has changed now, otherwise we can just follow the official documentation and forget about having the fields declared statically.
If you can propose a Pull request, then I would be very happy.
from cordova-plugin-health.
OK should be fixed now..
from cordova-plugin-health.
Thanks, you were faster than me :)
from cordova-plugin-health.
Related Issues (20)
- Google Oauth verification HOT 18
- How to pass the value to store blood_glucose? HOT 1
- Empty array for active calories HOT 2
- blood_glucose cannot be authorised on Android HOT 3
- How to query cycling distances in Health Connect? HOT 1
- add support for distance in Android HOT 6
- Add support for TotalCaloriesBurnedRecord HOT 1
- How obtain 3 synchronisations HOT 1
- delete operation on Android: Missing argument startDate HOT 3
- Datatype not supported heart_rate & Datatype not supported sleep HOT 6
- Open healthConnect / HealthKit programmatically to see app authorizations HOT 24
- AndroidManifest.xml permissions re-added when compiling HOT 3
- inconsistency in unit value for health data
- Android: Privacy Policy URL must be specified at installation time not runtime HOT 1
- Using targetSdkVersion 34 is not supported in Capacitor 5 HOT 4
- Execute multiple queries synchronously HOT 2
- NPM package is not updated HOT 3
- Health connect android - android 14 delete records crashes. HOT 1
- openHealthSettings() does not work on Android 14 / HONOR 70. HOT 6
- Always get steps in 0 count
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-health.