Comments (5)
I second your excitement. Looking forward to a response.
from healthkit.
Hi guys, thanks for the comments 👍
I've just checked in some basic plumbing and a test method for storing and reading one of the parameters of the HealthKit SDK (weight). I was able to store the weight via Javascript and see the update in the Health app of iOS8. Pretty cool stuff.
Before turning this into something more useful for developers, I'd like to ask you: which features do you expect the plugin to have. Which usecases do you have in mind exactly?
Thanks for thinking with me on this,
Eddy
from healthkit.
@EddyVerbruggen awesome. Would love to be able to post a completed activity with activity length and calories burned if that is an option. Was going to dive into the docs a bit more this week myself but I think these are options.
from healthkit.
Hi, I've added a few methods to play with.
@gylippus I will be looking at the Workout feature real soon. Here's the Workout reference btw.
from healthkit.
@EddyVerbruggen awesome. Well done. Was looking through the docs yesterday and imagined a common scenario would be something like this: https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HKWorkout_Class/
workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:metadata:
+ (instancetype)workoutWithActivityType:(HKWorkoutActivityType)workoutActivityType
startDate:(NSDate *)startDate
endDate:(NSDate *)endDate
duration:(NSTimeInterval)duration
totalEnergyBurned:(HKQuantity *)totalEnergyBurned
totalDistance:(HKQuantity *)totalDistance
metadata:(NSDictionary *)metadata
window.plugins.healthkit.saveWorkout({
'activityType': 'HKWorkoutActivityTypeCrossTraining'", // Directly associated with an HKWorkoutActivityType constants, maybe later custom activity
'startDate': "", // Optional Date() of start
'endDate': "", // Optional Date() of end
'duration': "1200", // Duration in seconds or milliseconds
'energyBurned': "120", // Total Energy burned, calories or kCal?
'totalDistance': "", // Optional distance? Maybe meters?
'extraData': "", // Not sure how necessary this is
},
callback,
callback
);
If you think of any ways I can help, definitely let me know. Even if just testing.
from healthkit.
Related Issues (20)
- 0.5.6 => ** BUILD FAILED ** HOT 4
- iOS app store rejection due to HKClinicalRecord HOT 7
- NSUnknownKeyException HOT 1
- Authorization to share the following types is disallowed HOT 4
- Privacy Policy Link HOT 3
- Error: Cannot find plugin.xml for plugin "needs". Please try adding it again. HOT 3
- Saving sleep data to Healthkit
- using this plugin for HKWorkoutActivityTypeMindAndBody data Type
- adding Mindful Minutes?
- Timestamp not getting with recorded data HOT 2
- HKClinicalRecord Flagged for Review HOT 11
- My app was rejected because of Clinical Health Records API HOT 1
- Clinical records Fork: queryClinicalSampleType & queryForClinicalRecordsWithFHIRResourceType hangs indefinitely HOT 1
- querySampleType not calling its callback
- Possible to get workout route data?
- The permission settings page does not open
- saveCategorySample?
- Permissions and Workout data? HOT 2
- Oxygen saturation
- How to query and return a subset of resutls like what findWorkouts() returns
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 healthkit.