calculate calories burned in taking steps and store in healthkit store.

Hi,


My app reads the steps taken my a user and the corresponding energy burmed.


I know I can get the steps taken from the health kit but can I also get the energy bunred correspondingly or do i need to calculate it my self?


Without that information, here is the stratgey I have decided. Please help me...


  1. Take necessary information from user of weight, height, etc. require to calculate the calories burnt in taking steps.
  2. store it in healthkit store
  3. calculate calories burned in taking steps by retrieving no.of steps taken from healthkit store.
  4. store it in the healthkit store as an HKQuantity activeenergyburned in an HKWorkout object.


Does this sound a good way?

Replies

I am not sure if Healthkit would automatically return calories burnt for the given steps taken or for the given time interval. will it calculate calories burned automatically?