Giter Site home page Giter Site logo

Comments (5)

dariosalvi78 avatar dariosalvi78 commented on September 13, 2024

you're right, I'll look into it...

from cordova-plugin-health.

dzolnai avatar dzolnai commented on September 13, 2024

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.

dariosalvi78 avatar dariosalvi78 commented on September 13, 2024

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.

dariosalvi78 avatar dariosalvi78 commented on September 13, 2024

OK should be fixed now..

from cordova-plugin-health.

dzolnai avatar dzolnai commented on September 13, 2024

Thanks, you were faster than me :)

from cordova-plugin-health.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.