BEHealthKit 1.11
A HealthKit plugin for Unity
Loading...
Searching...
No Matches
Public Attributes | Public Member Functions | List of all members
BeliefEngine.HealthKit.CategorySample Class Reference

Wrapper around HKCategorySample.

Public Attributes

int value
 the value of this sample
 
- Public Attributes inherited from BeliefEngine.HealthKit.Sample
DateTimeOffset startDate
 
DateTimeOffset endDate
 
- Public Attributes inherited from BeliefEngine.HealthKit.HObject
SourceRevision source
 
XmlNode metadata
 

Public Member Functions

 CategorySample (XmlNode node)
 The default constructor.
 
override string ToString ()
 convert to a reasonable string representation
 
- Public Member Functions inherited from BeliefEngine.HealthKit.Sample
 Sample (XmlNode node)
 The default constructor.
 
 Sample (DateTimeOffset startDate, DateTimeOffset endDate)
 Manual constructor.
 
override XElement ToXML ()
 Internal method. Converts the sample to XML.
 
- Public Member Functions inherited from BeliefEngine.HealthKit.HObject
 HObject (XmlNode node)
 The constructor used internally when reading health data.
 

Constructor & Destructor Documentation

◆ CategorySample()

BeliefEngine.HealthKit.CategorySample.CategorySample ( XmlNode node)
inline
Parameters
nodethe XmlNode to create this object from.

Member Data Documentation

◆ value

int BeliefEngine.HealthKit.CategorySample.value

This is an int, and the values depend on the sample type. It's probably worth reading the HKCategorySample documentation to understand what you're looking at. For sleep, basically a value of 0 means "in bed", and a 1 means "asleep". Other possible values are Awake (2), Core Sleep (3), Deep Sleep (4), and REM sleep (5). These will overlap, assuming a good HealthKit citizen is writing the data.