Giter Club home page Giter Club logo

Comments (6)

EddyVerbruggen avatar EddyVerbruggen commented on July 17, 2024

Hi, excellent question!

I just added a new function: checkAuthStatus. See the demo for usage details.

Each type is either undetermined, denied, or authorized, so I thought it'd be easiest you could simply pass in one type.

Please let me know what you think.

from healthkit.

bcfchen avatar bcfchen commented on July 17, 2024

Cool! I think this will work. I'll give it a shot tonight and let you know how it goes :) Thanks a ton!

from healthkit.

bcfchen avatar bcfchen commented on July 17, 2024

I just re-installed my Healthkit cordova plugin and gave it a shot. Strangely enough, I'm getting this error message:

22 352234 error Error: undefined is not a function (evaluating '$cordovaHealthKit.checkAuthStatus')
requestAuthorization@http://192.168.1.9:8100/app/services/healthKit/healthKitApi.js:81:46

I'm making the call like:
$cordovaHealthKit.checkAuthStatus({
'type': 'HKQuantityTypeIdentifierDistanceWalkingRunning'
}, function(response){
alert(JSON.stringify(response));
deferred.resolve(response);
});

The weird thing is, in my HealthKit.m, I'm actually seeing this:

  • (void) checkAuthStatus:(CDVInvokedUrlCommand*)command {

So the function does seem to exist. Would you have any idea where else I might check?

Thanks a bunch!

from healthkit.

EddyVerbruggen avatar EddyVerbruggen commented on July 17, 2024

I added the function to the plugin, not to ngCordova.

from healthkit.

EddyVerbruggen avatar EddyVerbruggen commented on July 17, 2024

For your convenience, I just added checkAuthStatus to ngCordova: ionic-team/ng-cordova#753

Please wait until it's released, or go bleeding edge.

from healthkit.

bcfchen avatar bcfchen commented on July 17, 2024

Ahhh no duh, how embarrassing :( Thanks a bunch!

from healthkit.

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.