From: Tomasz Marciniak Date: Thu, 3 Nov 2016 12:14:28 +0000 (+0100) Subject: [HAM] Added guide and tutorial for recorder. X-Git-Tag: tizen_3.0/TD_SYNC/20161201~15^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F22%2F95522%2F4;p=sdk%2Fonline-doc.git [HAM] Added guide and tutorial for recorder. PS3: [LB] Reviewed Change-Id: I85b61c57739fca310da46091e2855a7287f06a4a Signed-off-by: Tomasz Marciniak --- diff --git a/org.tizen.guides/html/web/sensors/ham_w.htm b/org.tizen.guides/html/web/sensors/ham_w.htm index 6fd4efe..9e473fc 100644 --- a/org.tizen.guides/html/web/sensors/ham_w.htm +++ b/org.tizen.guides/html/web/sensors/ham_w.htm @@ -29,12 +29,11 @@

Related Info

For more information about how to use Human Activity Monitor API, see Human Activity Monitor Guide. @@ -37,16 +39,19 @@ For more information about how to use Human Activity Monitor API, see HumanActivityType

  • - 1.2. PedometerStepStatus + 1.2. HumanActivityRecorderType +
  • +
  • + 1.3. PedometerStepStatus
  • - 1.3. ActivityRecognitionType + 1.4. ActivityRecognitionType
  • - 1.4. ActivityAccuracy + 1.5. ActivityAccuracy
  • - 1.5. SleepStatus + 1.6. SleepStatus
  • @@ -57,25 +62,41 @@ For more information about how to use Human Activity Monitor API, see StepDifference -
  • 2.4. HumanActivityData +
  • 2.4. HumanActivityRecorderOption +
  • +
  • 2.5. HumanActivityRecorderQuery +
  • +
  • 2.6. HumanActivityData +
  • +
  • 2.7. HumanActivityPedometerData +
  • +
  • 2.8. HumanActivityAccumulativePedometerData +
  • +
  • 2.9. HumanActivityHRMData
  • -
  • 2.5. HumanActivityPedometerData +
  • 2.10. HumanActivityGPSInfo
  • -
  • 2.6. HumanActivityAccumulativePedometerData +
  • 2.11. HumanActivityGPSInfoArray
  • -
  • 2.7. HumanActivityHRMData +
  • 2.12. HumanActivitySleepMonitorData
  • -
  • 2.8. HumanActivityGPSInfo +
  • 2.13. HumanActivityMonitorOption
  • -
  • 2.9. HumanActivityGPSInfoArray +
  • 2.14. HumanActivityRecognitionData
  • -
  • 2.10. HumanActivitySleepMonitorData +
  • 2.15. HumanActivityRecorderData
  • -
  • 2.11. HumanActivityMonitorOption +
  • 2.16. HumanActivityRecorderPedometerData
  • -
  • 2.12. HumanActivityRecognitionData +
  • 2.17. HumanActivityRecorderHRMData
  • -
  • 2.13. HumanActivityMonitorSuccessCallback +
  • 2.18. HumanActivityRecorderSleepMonitorData +
  • +
  • 2.19. HumanActivityRecorderPressureData +
  • +
  • 2.20. HumanActivityMonitorSuccessCallback +
  • +
  • 2.21. HumanActivityReadRecorderSuccessCallback
  • @@ -106,6 +127,9 @@ For more information about how to use Human Activity Monitor API, see unsetAccumulativePedometerListener ()
    long addActivityRecognitionListener (ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback)
    void removeActivityRecognitionListener (long listenerId, optional ErrorCallback? errorCallback)
    +
    void startRecorder (HumanActivityRecorderType type, optional HumanActivityRecorderOption option)
    +
    void stopRecorder (HumanActivityRecorderType type)
    +
    void readRecorderData (HumanActivityRecorderType type, HumanActivityRecorderQuery? query, HumanActivityReadRecorderSuccessCallback successCallback, optional ErrorCallback? errorCallback)
    @@ -113,6 +137,14 @@ For more information about how to use Human Activity Monitor API, see HumanActivityRecorderOption + + + +HumanActivityRecorderQuery + + + HumanActivityData @@ -149,9 +181,33 @@ For more information about how to use Human Activity Monitor API, see HumanActivityRecorderData + + + +HumanActivityRecorderPedometerData + + + +HumanActivityRecorderHRMData + + + +HumanActivityRecorderSleepMonitorData + + + +HumanActivityRecorderPressureData + + + HumanActivityMonitorSuccessCallback
    void onsuccess (optional HumanActivityData? humanactivitydata)
    + +HumanActivityReadRecorderSuccessCallback +
    void onsuccess (HumanActivityRecorderData[] humanactivitydata)
    +
    @@ -187,8 +243,34 @@ SLEEP_MONITOR - Sleep monitor (sleep state) SLEEP_MONITOR is supported since Tizen 3.0

    +
    +

    1.2. HumanActivityRecorderType

    +
    + Specifies the human activity recorder types. +
    +
        enum HumanActivityRecorderType { "PEDOMETER", "HRM", "SLEEP_MONITOR", "PRESSURE" };
    +

    + Since: + 3.0 +

    +
    +

    +The human activity recorder types defined by this enumerator are: +

    +
      +
    • +PEDOMETER - Pedometer recorder type
    • +
    • +HRM - Heart rate monitor (Heart rate)
    • +
    • +SLEEP_MONITOR - Sleep monitor (sleep state)
    • +
    • +PRESSURE - Pressure sensor
    • +
    +
    +
    -

    1.2. PedometerStepStatus

    +

    1.3. PedometerStepStatus

    Specifies the pedometer user's current movement type.
    @@ -214,7 +296,7 @@ UNKNOWN - The user's movement type is uncertain

    -

    1.3. ActivityRecognitionType

    +

    1.4. ActivityRecognitionType

    Specifies the supported activity recognition types.
    @@ -240,7 +322,7 @@ IN_VEHICLE - The in-vehicle activity recognition type
    -

    1.4. ActivityAccuracy

    +

    1.5. ActivityAccuracy

    Specified the degree of the accuracy.
    @@ -264,7 +346,7 @@ HIGH - High accuracy
    -

    1.5. SleepStatus

    +

    1.6. SleepStatus

    Specifies the sleep monitor user's sleep status.
    @@ -326,17 +408,26 @@ The tizen.humanactivitymonitor object allows access to the human activi void getHumanActivityData(HumanActivityType type, HumanActivityMonitorSuccessCallback successCallback, optional ErrorCallback? errorCallback) raises(WebAPIException); - void start(HumanActivityType type, optional HumanActivityMonitorSuccessCallback? changedCallback, optional ErrorCallback? errorCallback, optional HumanActivityMonitorOption? option) raises(WebAPIException); + void start(HumanActivityType type, optional HumanActivityMonitorSuccessCallback? changedCallback, optional ErrorCallback? errorCallback, optional HumanActivityMonitorOption? option) raises(WebAPIException); - void stop(HumanActivityType type) raises(WebAPIException); + void stop(HumanActivityType type) raises(WebAPIException); - void setAccumulativePedometerListener(HumanActivityMonitorSuccessCallback changeCallback) raises(WebAPIException); + void setAccumulativePedometerListener(HumanActivityMonitorSuccessCallback changeCallback) raises(WebAPIException); - void unsetAccumulativePedometerListener() raises(WebAPIException); + void unsetAccumulativePedometerListener() raises(WebAPIException); - long addActivityRecognitionListener(ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback) raises(WebAPIException); + long addActivityRecognitionListener(ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback) raises(WebAPIException); - void removeActivityRecognitionListener(long listenerId, optional ErrorCallback? errorCallback); + void removeActivityRecognitionListener(long listenerId, optional ErrorCallback? errorCallback); + + void startRecorder(HumanActivityRecorderType type, optional HumanActivityRecorderOption option) raises(WebAPIException); + + void stopRecorder(HumanActivityRecorderType type) raises(WebAPIException); + + void readRecorderData(HumanActivityRecorderType type, + HumanActivityRecorderQuery? query, + HumanActivityReadRecorderSuccessCallback successCallback, + optional ErrorCallback? errorCallback) raises(WebAPIException); };

    Since: @@ -388,7 +479,7 @@ The ErrorCallback method is launched with these error types:

    Parameters:

    • -type: +type: Human activity data type to read (HRM or PEDOMETER)
    • @@ -504,11 +595,11 @@ For other types, only 'http://tizen.org/privilege/healthinfo' should be d Callback method to be invoked when new human activity data is available
      Note that the listener is not called for the successful start of a human activity sensor.
    • -errorCallback [optional] [nullable]: +errorCallback [optional] [nullable]: Callback method to be invoked when an error occurs
    • -option [optional] [nullable]: +option [optional] [nullable]: The option to set the period and the interval for several human activity types
      By default, this parameter is set to null.
    @@ -883,6 +974,248 @@ The ErrorCallback method is launched with this error type:
    +
    +startRecorder +
    +
    +
    + Starts recording human activity data for a given human activity type. +
    +
    void startRecorder(HumanActivityRecorderType type, optional HumanActivityRecorderOption option);
    +             
    +

    + Since: + 3.0 +

    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/healthinfo +

    +
    +

    Parameters:

    +
      +
    • +type: + Human activity type to record +
    • +
    • +option [optional]: + The option to set an interval and a period for retention +
    • +
    +
    +
    +

    Exceptions:

    +
    • WebAPIException
        +
      • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

      • +
      • + with error type SecurityError, if the application does not have the privilege to use this function. +

      • +
      • + with error type NotSupportedError, if the human activity recorder type is not supported. +

      • +
      • + with error type AbortError, if the system operation was aborted. +

      • +
      • + with error type InvalidValuesError, if any of the input parameters contain an invalid value. +

      • +
      +
    +
    +
    +

    Code example:

    +var type = 'PRESSURE';
    +var options =
    +{
    +   retentionPeriod: 1 /* 1 hour */
    +};
    +try
    +{
    +   tizen.humanactivitymonitor.startRecorder(type, options);
    +}
    +catch (err)
    +{
    +   console.log(err.name + ': ' + err.message);
    +}
    +
    +
    +
    +
    +stopRecorder +
    +
    +
    + Stops recording human activity data for a given human activity type. +
    +
    void stopRecorder(HumanActivityRecorderType type);
    +             
    +

    + Since: + 3.0 +

    +
    +

    Parameters:

    +
      +
    • +type: + Human activity type to stop recording +
    • +
    +
    +
    +

    Exceptions:

    +
    • WebAPIException
        +
      • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

      • +
      • + with error type NotSupportedError, if the human activity recorder type is not supported. +

      • +
      • + with error type AbortError, if the system operation was aborted. +

      • +
      +
    +
    +
    +

    Code example:

    +var type = 'PRESSURE';
    +try
    +{
    +   tizen.humanactivitymonitor.startRecorder(type);
    +
    +   /* Do something */
    +
    +   tizen.humanactivitymonitor.stopRecorder(type);
    +}
    +catch (err)
    +{
    +   console.log(err.name + ': ' + err.message);
    +}
    +
    +
    +
    +
    +readRecorderData +
    +
    +
    + Reads the recorded human activity data with some query. +
    +
    void readRecorderData(HumanActivityRecorderType type, HumanActivityRecorderQuery? query, HumanActivityReadRecorderSuccessCallback successCallback, optional ErrorCallback? errorCallback);
    +             
    +

    + Since: + 3.0 +

    +
    +

    +If another application has recorded data for a particular human activity type, your application can read that data. +Therefore, you can use this method to read without calling startRecorder(). +

    +

    +The ErrorCallback method is launched with these error types: +

    +
      +
    • +AbortError: If the system operation was aborted while reading data asynchronously.
    • +
    • +NotFoundError: If no recorder data is available.
    • +
    +
    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/healthinfo +

    +
    +

    Parameters:

    +
      +
    • +type: + Human activity type to record +
    • +
    • +query [nullable]: + The query to use +
    • +
    • +successCallback: + Callback method to be invoked when recorded human activity data is successfully read +
    • +
    • +errorCallback [optional] [nullable]: + Callback method to be invoked when an error occurs +
    • +
    +
    +
    +

    Exceptions:

    +
    • WebAPIException
        +
      • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

      • +
      • + with error type SecurityError, if the application does not have the privilege to use this function. +

      • +
      • + with error type NotSupportedError, if the human activity recorder type is not supported. +

      • +
      • + with error type AbortError, if the system operation was aborted when it is requested to read data. +

      • +
      • + with error type InvalidValuesError, if any of the input parameters contain an invalid value. +

      • +
      +
    +
    +
    +

    Code example:

    +function onerror(error)
    +{
    +   console.log(error.name + ": " + error.message);
    +}
    +
    +function onread(data)
    +{
    +   for (var idx = 0; idx < data.length; ++idx)
    +   {
    +      console.log('startTime: ' + data[idx].startTime);
    +      console.log('endTime: ' + data[idx].endTime);
    +      console.log('calories: ' + data[idx].calorie);
    +   }
    +}
    +
    +var type = 'PEDOMETER';
    +var query = {};
    +try
    +{
    +   tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
    +}
    +catch (err)
    +{
    +   console.log(err.name + ': ' + err.message);
    +}
    +
    +
    +
    +

    Output example:

     startTime: 1420311755
    + endTime: 1420313238
    + calories: 24.83
    + 
    +
    +
    @@ -927,32 +1260,242 @@ The ErrorCallback method is launched with this error type: -
    -

    2.4. HumanActivityData

    +
    +

    2.4. HumanActivityRecorderOption

    - The HumanActivityData interface is a common abstract interface used by the different types of human activity data. + The HumanActivityRecorderOption dictionary contains options, such as the interval, to use with startRecorder().
    -
        [NoInterfaceObject] interface HumanActivityData {
    +
        dictionary HumanActivityRecorderOption {
    +        long interval;
    +
    +        long retentionPeriod;
         };

    Since: - 2.3 + 3.0

    +
    +

    Code example:

    +var option =
    +{
    +   interval: 10,
    +   retentionPeriod: 1
    +}
    +
    -
    -

    2.5. HumanActivityPedometerData

    +
    +

    Dictionary members

    +
    +
    long interval
    +
    - The HumanActivityPedometerData interface represents pedometer data. + Interval in minutes at which human activity recorder data will be recorded. +
    +
    +

    +For the HRM type, the interval can be between 10 and 1440 (1 day) inclusive.
    If interval is not specified, it is set to the default value of 1440 minutes (1 day).
    For other human activity recorder types, interval will be ignored. +

    +
    +

    + Since: + 3.0 +

    +

    Remark : + The specified interval is only a suggested interval between sensor measurements. +You will get at least one sensor measurement within the interval you specify, but the actual interval between sensor measurements can be affected by other applications and the system. +To reduce the system overhead, it is recommended to set the longest interval that you can, because the system usually chooses the shortest interval among all intervals specified. +

    +
    +
    long retentionPeriod
    +
    +
    + Retention period in hours for which human activity recorder data should be retained. +
    +
    +

    +The retentionPeriod can be between 1 and 744 (31 days) inclusive.
    If retentionPeriod is not specified, it is set to the default value of 1 hour. +

    +
    +

    + Since: + 3.0 +

    +
    +
    +
    +
    +
    +

    2.5. HumanActivityRecorderQuery

    +
    + The HumanActivityRecorderQuery dictionary contains query, such as the startTime, the endTime, the anchorTime and the interval, to use with readRecorderData().
    -
        [NoInterfaceObject] interface HumanActivityPedometerData : HumanActivityData {
    -
    -        readonly attribute PedometerStepStatus stepStatus;
    +
        dictionary HumanActivityRecorderQuery {
    +        long startTime;
     
    -        readonly attribute double speed;
    +        long endTime;
     
    -        readonly attribute double walkingFrequency;
    +        long anchorTime;
     
    -        readonly attribute double cumulativeDistance;
    +        long interval;
    +    };
    +

    + Since: + 3.0 +

    +
    +

    Dictionary members

    +
    +
    long startTime
    +
    +
    + The start time of the data to be queried. Epoch time in seconds. +
    +
    +

    +The startTime should be greater than or equal to zero.
    If startTime is not specified, it is set to the default value of 1 day ago. +

    +
    +

    + Since: + 3.0 +

    +
    +
    long endTime
    +
    +
    + The end time of the date to be queried. Epoch time in seconds. +
    +
    +

    +The endTime should be greater than startTime.
    If endTime in not specified, it is set to the current time. +

    +
    +

    + Since: + 3.0 +

    +
    +
    long anchorTime
    +
    +
    + The anchor point to slice the read data. Epoch time in seconds. +
    +
    +

    +For the PEDOMETER and PRESSURE type, the anchorTime can only be used.
    The anchorTime should be greater than or equal to zero.
    If anchorTime is not specified, it will be set to the endTime. +

    +

    +The interval will extend away from the anchorTime in both directions. +The exact date does not matter for the anchorTime. +This is because the anchorTime is used in combination with the interval. +For example, the anchorTime can be 1:00 am, January 1, 2000 or 1:00 am, August 15, 2010 with a 1 day interval. In both cases, the anchorTime will be 1:00 am internally. +

    +

    +query example

    +
    +

    + Since: + 3.0 +

    +
    +

    Code example:

    +function onerror(error)
    +{
    +   console.log(error.name + ": " + error.message);
    +}
    +
    +function onread(data)
    +{
    +   for (var idx = 0; idx < data.length; ++idx)
    +   {
    +      console.log("*** " + idx);
    +      console.log('totalStepCount: ' + data[idx].totalStepCount);
    +   }
    +}
    +
    +var type = 'PEDOMETER';
    +var now = new Date();
    +var startTime = now.setDate(now.getDate() - 7);
    +var anchorTime = (new Date(2000, 1, 2, 6)).getTime();
    +var query =
    +{
    +   startTime: startTime / 1000,
    +   anchorTime: anchorTime / 1000,
    +   interval: 1440 /* 1 day */
    +};
    +try
    +{
    +   tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
    +}
    +catch (err)
    +{
    +   console.log(err.name + ': ' + err.message);
    +}
    +
    +
    +
    +

    Output example:

     *** 0
    + totalStepCount: 3860
    + *** 1
    + totalStepCount: 6705
    + *** 2
    + totalStepCount: 4005
    + *** 3
    + totalStepCount: 2328
    + *** 4
    + totalStepCount: 4705
    + *** 5
    + totalStepCount: 6446
    + *** 6
    + totalStepCount: 4103
    + *** 7
    + totalStepCount: 1456
    + 
    +
    +
    +
    long interval
    +
    +
    + Interval in minutes at which human activity recorder data will be read. +
    +
    +

    +The interval should be greater than or equal to zero.
    For the PEDOMETER and PRESSURE type, if interval is not specified, it is set to the difference between endTime and startTime.
    For the PRESSURE type, if it is set to zero, all raw data recorded from startTime to endTime will be returned.
    For other recorder types, interval will be ignored.

    +
    +

    + Since: + 3.0 +

    +
    +
    +
    +
    +
    +

    2.6. HumanActivityData

    +
    + The HumanActivityData interface is a common abstract interface used by the different types of human activity data. +
    +
        [NoInterfaceObject] interface HumanActivityData {
    +    };
    +

    + Since: + 2.3 +

    +
    +
    +

    2.7. HumanActivityPedometerData

    +
    + The HumanActivityPedometerData interface represents pedometer data. +
    +
        [NoInterfaceObject] interface HumanActivityPedometerData : HumanActivityData {
    +
    +        readonly attribute PedometerStepStatus stepStatus;
    +
    +        readonly attribute double speed;
    +
    +        readonly attribute double walkingFrequency;
    +
    +        readonly attribute double cumulativeDistance;
     
             readonly attribute double cumulativeCalorie;
     
    @@ -1072,7 +1615,7 @@ The value is the sum of cumulativeWalkStepCount and cumulativeRunSt
     
    -

    2.6. HumanActivityAccumulativePedometerData

    +

    2.8. HumanActivityAccumulativePedometerData

    The HumanActivityAccumulativePedometerData interface represents pedometer motion data since the device is booted.
    @@ -1204,7 +1747,7 @@ The value is the sum of accumulativeWalkStepCount and accumulativeR
    -

    2.7. HumanActivityHRMData

    +

    2.9. HumanActivityHRMData

    The HumanActivityHRMData interface represents Heart Rate Monitor(HRM) data.
    @@ -1247,7 +1790,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    -

    2.8. HumanActivityGPSInfo

    +

    2.10. HumanActivityGPSInfo

    The HumanActivityGPSInfo interface represents GPS information.
    @@ -1336,7 +1879,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    -

    2.9. HumanActivityGPSInfoArray

    +

    2.11. HumanActivityGPSInfoArray

    The HumanActivityGPSInfoArray interface represents GPS information array.
    @@ -1365,7 +1908,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    -

    2.10. HumanActivitySleepMonitorData

    +

    2.12. HumanActivitySleepMonitorData

    The HumanActivitySleepMonitorData interface represents sleep monitor data.
    @@ -1382,7 +1925,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user

    Remark : If the device's display is off, multiple callbacks consisting of sleep monitor data are all invoked at once at a device specific interval. There is a callback for each minute in the interval. For example, if the device's interval is 20 minutes, 20 callbacks will be invoked every 20 minutes. When the display is turned on, all callbacks which have not been invoked are invoked and the callback is invoked every one minute from then on. Therefore, if the display is turned on at 25 minutes, five callbacks will be invoked.

    - +

    Attributes

      @@ -1410,7 +1953,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    -

    2.11. HumanActivityMonitorOption

    +

    2.13. HumanActivityMonitorOption

    The HumanActivityMonitorOption dictionary contains options, such as the callbackInterval and the sampleInterval, to use with start().
    @@ -1430,7 +1973,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    long callbackInterval
    - The interval in milliseconds (ms) at which human activity data will be sent to the Web Application.
    For the GPS type, callbackInterval should be greater than or equal to the sampleInterval. The maximum permissible value for callbackInterval is device specific. If callbackInterval is not specified or zero, it is set to the default value of 150000ms. The callbackInterval will be ignored when the display is on. Instead, The callbackInterval will be set to the sampleInterval.
    For the HRM type, callbackInterval can be between 10ms and 1000ms inclusive, however, if it not specified or zero, it is set set by the default value of 100ms.
    For other activity types, callbackInterval will be ignored. + The interval in milliseconds (ms) at which human activity data will be sent to the Web Application.
    For the GPS type, callbackInterval should be greater than or equal to the sampleInterval. The maximum permissible value for callbackInterval is device specific. If callbackInterval is not specified or zero, it is set to the default value of 150000ms. The callbackInterval will be ignored when the display is on. Instead, The callbackInterval will be set to the sampleInterval.
    For the HRM type, callbackInterval can be between 10ms and 1000ms inclusive, however, if it not specified or zero, it is set by the default value of 100ms.
    For other activity types, callbackInterval will be ignored.

    Since: @@ -1454,7 +1997,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user

    -

    2.12. HumanActivityRecognitionData

    +

    2.14. HumanActivityRecognitionData

    The HumanActivityRecognitionData interface represents a activity recognition data.
    @@ -1507,8 +2050,237 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    +
    +

    2.15. HumanActivityRecorderData

    +
    + The HumanActivityRecorderData interface is a common abstract interface used for the different types of human activity recorder data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderData {
    +
    +        readonly attribute long startTime;
    +
    +        readonly attribute long endTime;
    +    };
    +

    + Since: + 3.0 +

    +
    +

    Attributes

    +
      +
    • + readonly +long startTime
      + Recording start time of the data in this HumanActivityRecorderData object. Epoch time in seconds. +
      +

      + Since: + 3.0 +

      +
    • +
    • + readonly +long endTime
      + Recording end time of the data in this HumanActivityRecorderData object. Epoch time in seconds. +
      +

      + Since: + 3.0 +

      +
    • +
    +
    +
    +
    +

    2.16. HumanActivityRecorderPedometerData

    +
    + The HumanActivityRecorderPedometerData interface represents recorded PEDOMETER data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderPedometerData : HumanActivityRecorderData {
    +
    +        readonly attribute double distance;
    +
    +        readonly attribute double calorie;
    +
    +        readonly attribute double totalStepCount;
    +
    +        readonly attribute double walkStepCount;
    +
    +        readonly attribute double runStepCount;
    +    };
    +

    + Since: + 3.0 +

    + +
    +

    Attributes

    +
      +
    • + readonly +double distance
      + Distance traveled from startTime to endTime in meters. +
      +

      + Since: + 3.0 +

      +
    • +
    • + readonly +double calorie
      + Calories burned from startTime to endTime in kCal. +
      +

      + Since: + 3.0 +

      +
    • +
    • + readonly +double totalStepCount
      + Walking and running step count from startTime to endTime. The value is the sum of walkingStepCount and runningStepCount. +
      +

      + Since: + 3.0 +

      +
    • +
    • + readonly +double walkStepCount
      + Walking step count from startTime to endTime. +
      +

      + Since: + 3.0 +

      +
    • +
    • + readonly +double runStepCount
      + Running step count from startTime to endTime. +
      +

      + Since: + 3.0 +

      +
    • +
    +
    +
    +
    +

    2.17. HumanActivityRecorderHRMData

    +
    + The HumanActivityRecorderHRMData interface represents a recorded HRM data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderHRMData : HumanActivityRecorderData {
    +
    +        readonly attribute long heartRate;
    +    };
    +

    + Since: + 3.0 +

    + +
    +

    Attributes

    +
    • + readonly +long heartRate
      + Heart rate in beats per minute. +
      +

      + Since: + 3.0 +

      +
    +
    +
    +
    +

    2.18. HumanActivityRecorderSleepMonitorData

    +
    + The HumanActivityRecorderSleepMonitorData interface represents a recorded SLEEP_MONITOR data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderSleepMonitorData : HumanActivityRecorderData {
    +
    +        readonly attribute SleepStatus status;
    +    };
    +

    + Since: + 3.0 +

    + +
    +

    Attributes

    +
    • + readonly +SleepStatus status
      + The sleep status. +
      +

      + Since: + 3.0 +

      +
    +
    +
    +
    +

    2.19. HumanActivityRecorderPressureData

    +
    + The HumanActivityRecorderPressureData interface represents a recorded PRESSURE data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderPressureData : HumanActivityRecorderData {
    +
    +        readonly attribute double? max;
    +
    +        readonly attribute double? min;
    +
    +        readonly attribute double? average;
    +    };
    +

    + Since: + 3.0 +

    + +
    +

    Attributes

    +
      +
    • + readonly +double max [nullable]
      + Max pressure in hectopascal (hPa). +
      +

      + Since: + 3.0 +

      +
    • +
    • + readonly +double min [nullable]
      + Min pressure in hectopascal (hPa). +
      +

      + Since: + 3.0 +

      +
    • +
    • + readonly +double average [nullable]
      + Average pressure in hectopascal (hPa). +
      +

      + Since: + 3.0 +

      +
    • +
    +
    +
    -

    2.13. HumanActivityMonitorSuccessCallback

    +

    2.20. HumanActivityMonitorSuccessCallback

    The HumanActivityMonitorSuccessCallback interface is a callback interface that is invoked when new human activity data is available.
    @@ -1549,6 +2321,48 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    +
    +

    2.21. HumanActivityReadRecorderSuccessCallback

    +
    + The HumanActivityReadRecorderSuccessCallback interface is a callback interface that is invoked when recorded human activity data is successfully read. +
    +
        [Callback=FunctionOnly, NoInterfaceObject] interface HumanActivityReadRecorderSuccessCallback {
    +
    +        void onsuccess(HumanActivityRecorderData[] humanactivitydata);
    +    };
    +

    + Since: + 3.0 +

    +
    +

    Methods

    +
    +
    +onsuccess +
    +
    +
    + Called when recorded human activity data is successfully read. +
    +
    void onsuccess(HumanActivityRecorderData[] humanactivitydata);
    +             
    +

    + Since: + 3.0 +

    +
    +

    Parameters:

    +
      +
    • +humanactivitydata: + Recorded human activity data. +
    • +
    +
    +
    +
    +
    +

    3. Related Feature

    @@ -1609,6 +2423,14 @@ To guarantee that the human sleep state tracking application runs on a device wi

  • http://tizen.org/feature/sensor.sleep_monitor
  • +
    +

    +

    +To guarantee that the barometer(pressure) sensor application runs on a device with a barometric (pressure) sensor, declare the following feature requirement in the config file: +

    +

    +
  • http://tizen.org/feature/sensor.barometer
  • +

    For more information, see Application Filtering. @@ -1617,6 +2439,8 @@ To guarantee that the human sleep state tracking application runs on a device wi enum HumanActivityType { "PEDOMETER", "WRIST_UP", "HRM", "GPS", "SLEEP_MONITOR" }; + enum HumanActivityRecorderType { "PEDOMETER", "HRM", "SLEEP_MONITOR", "PRESSURE" }; + enum PedometerStepStatus { "NOT_MOVING", "WALKING", "RUNNING", "UNKNOWN" }; enum ActivityRecognitionType { "STATIONARY", "WALKING", "RUNNING", "IN_VEHICLE" }; @@ -1635,17 +2459,26 @@ To guarantee that the human sleep state tracking application runs on a device wi void getHumanActivityData(HumanActivityType type, HumanActivityMonitorSuccessCallback successCallback, optional ErrorCallback? errorCallback) raises(WebAPIException); - void start(HumanActivityType type, optional HumanActivityMonitorSuccessCallback? changedCallback, optional ErrorCallback? errorCallback, optional HumanActivityMonitorOption? option) raises(WebAPIException); + void start(HumanActivityType type, optional HumanActivityMonitorSuccessCallback? changedCallback, optional ErrorCallback? errorCallback, optional HumanActivityMonitorOption? option) raises(WebAPIException); + + void stop(HumanActivityType type) raises(WebAPIException); + + void setAccumulativePedometerListener(HumanActivityMonitorSuccessCallback changeCallback) raises(WebAPIException); + + void unsetAccumulativePedometerListener() raises(WebAPIException); - void stop(HumanActivityType type) raises(WebAPIException); + long addActivityRecognitionListener(ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback) raises(WebAPIException); - void setAccumulativePedometerListener(HumanActivityMonitorSuccessCallback changeCallback) raises(WebAPIException); + void removeActivityRecognitionListener(long listenerId, optional ErrorCallback? errorCallback); - void unsetAccumulativePedometerListener() raises(WebAPIException); + void startRecorder(HumanActivityRecorderType type, optional HumanActivityRecorderOption option) raises(WebAPIException); - long addActivityRecognitionListener(ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback) raises(WebAPIException); + void stopRecorder(HumanActivityRecorderType type) raises(WebAPIException); - void removeActivityRecognitionListener(long listenerId, optional ErrorCallback? errorCallback); + void readRecorderData(HumanActivityRecorderType type, + HumanActivityRecorderQuery? query, + HumanActivityReadRecorderSuccessCallback successCallback, + optional ErrorCallback? errorCallback) raises(WebAPIException); }; [NoInterfaceObject] interface StepDifference { @@ -1655,12 +2488,28 @@ To guarantee that the human sleep state tracking application runs on a device wi readonly attribute long timestamp; }; + dictionary HumanActivityRecorderOption { + long interval; + + long retentionPeriod; + }; + + dictionary HumanActivityRecorderQuery { + long startTime; + + long endTime; + + long anchorTime; + + long interval; + }; + [NoInterfaceObject] interface HumanActivityData { }; - [NoInterfaceObject] interface HumanActivityPedometerData : HumanActivityData { + [NoInterfaceObject] interface HumanActivityPedometerData : HumanActivityData { - readonly attribute PedometerStepStatus stepStatus; + readonly attribute PedometerStepStatus stepStatus; readonly attribute double speed; @@ -1676,12 +2525,12 @@ To guarantee that the human sleep state tracking application runs on a device wi readonly attribute double cumulativeRunStepCount; - readonly attribute StepDifference[] stepCountDifferences; + readonly attribute StepDifference[] stepCountDifferences; }; - [NoInterfaceObject] interface HumanActivityAccumulativePedometerData : HumanActivityData { + [NoInterfaceObject] interface HumanActivityAccumulativePedometerData : HumanActivityData { - readonly attribute PedometerStepStatus stepStatus; + readonly attribute PedometerStepStatus stepStatus; readonly attribute double speed; @@ -1697,10 +2546,10 @@ To guarantee that the human sleep state tracking application runs on a device wi readonly attribute double accumulativeRunStepCount; - readonly attribute StepDifference[] stepCountDifferences; + readonly attribute StepDifference[] stepCountDifferences; }; - [NoInterfaceObject] interface HumanActivityHRMData : HumanActivityData { + [NoInterfaceObject] interface HumanActivityHRMData : HumanActivityData { readonly attribute long heartRate; @@ -1722,12 +2571,12 @@ To guarantee that the human sleep state tracking application runs on a device wi readonly attribute long timestamp; }; - [NoInterfaceObject] interface HumanActivityGPSInfoArray : HumanActivityData { + [NoInterfaceObject] interface HumanActivityGPSInfoArray : HumanActivityData { - readonly attribute HumanActivityGPSInfo[] gpsInfo; + readonly attribute HumanActivityGPSInfo[] gpsInfo; }; - [NoInterfaceObject] interface HumanActivitySleepMonitorData : HumanActivityData { + [NoInterfaceObject] interface HumanActivitySleepMonitorData : HumanActivityData { readonly attribute SleepStatus status; @@ -1741,20 +2590,63 @@ To guarantee that the human sleep state tracking application runs on a device wi long sampleInterval; }; - [NoInterfaceObject] interface HumanActivityRecognitionData : HumanActivityData { + [NoInterfaceObject] interface HumanActivityRecognitionData : HumanActivityData { - readonly attribute ActivityRecognitionType type; + readonly attribute ActivityRecognitionType type; readonly attribute long timestamp; - readonly attribute ActivityAccuracy accuracy; + readonly attribute ActivityAccuracy accuracy; + }; + + [NoInterfaceObject] interface HumanActivityRecorderData { + + readonly attribute long startTime; + + readonly attribute long endTime; + }; + + [NoInterfaceObject] interface HumanActivityRecorderPedometerData : HumanActivityRecorderData { + + readonly attribute double distance; + + readonly attribute double calorie; + + readonly attribute double totalStepCount; + + readonly attribute double walkStepCount; + + readonly attribute double runStepCount; + }; + + [NoInterfaceObject] interface HumanActivityRecorderHRMData : HumanActivityRecorderData { + + readonly attribute long heartRate; + }; + + [NoInterfaceObject] interface HumanActivityRecorderSleepMonitorData : HumanActivityRecorderData { + + readonly attribute SleepStatus status; + }; + + [NoInterfaceObject] interface HumanActivityRecorderPressureData : HumanActivityRecorderData { + + readonly attribute double? max; + + readonly attribute double? min; + + readonly attribute double? average; }; [Callback=FunctionOnly, NoInterfaceObject] interface HumanActivityMonitorSuccessCallback { - void onsuccess(optional HumanActivityData? humanactivitydata); + void onsuccess(optional HumanActivityData? humanactivitydata); }; + [Callback=FunctionOnly, NoInterfaceObject] interface HumanActivityReadRecorderSuccessCallback { + + void onsuccess(HumanActivityRecorderData[] humanactivitydata); + }; };
    long addActivityRecognitionListener (ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback)
    void removeActivityRecognitionListener (long listenerId, optional ErrorCallback? errorCallback)
    +
    void startRecorder (HumanActivityRecorderType type, optional HumanActivityRecorderOption option)
    +
    void stopRecorder (HumanActivityRecorderType type)
    +
    void readRecorderData (HumanActivityRecorderType type, HumanActivityRecorderQuery? query, HumanActivityReadRecorderSuccessCallback successCallback, optional ErrorCallback? errorCallback)
    @@ -113,6 +137,14 @@ For more information about how to use Human Activity Monitor API, see HumanActivityRecorderOption + + + +HumanActivityRecorderQuery + + + HumanActivityData @@ -149,9 +181,33 @@ For more information about how to use Human Activity Monitor API, see HumanActivityRecorderData + + + +HumanActivityRecorderPedometerData + + + +HumanActivityRecorderHRMData + + + +HumanActivityRecorderSleepMonitorData + + + +HumanActivityRecorderPressureData + + + HumanActivityMonitorSuccessCallback
    void onsuccess (optional HumanActivityData? humanactivitydata)
    + +HumanActivityReadRecorderSuccessCallback +
    void onsuccess (HumanActivityRecorderData[] humanactivitydata)
    +
    @@ -184,15 +240,41 @@ SLEEP_MONITOR - Sleep monitor (sleep state)

    Remark : - SLEEP_MONITOR is supported since Tizen 3.0 + SLEEP_MONITOR is supported since Tizen 2.3.2 +

    + +
    +

    1.2. HumanActivityRecorderType

    +
    + Specifies the human activity recorder types. +
    +
        enum HumanActivityRecorderType { "PEDOMETER", "HRM", "SLEEP_MONITOR", "PRESSURE" };
    +

    + Since: + 2.3.2

    +
    +

    +The human activity recorder types defined by this enumerator are: +

    +
      +
    • +PEDOMETER - Pedometer recorder type
    • +
    • +HRM - Heart rate monitor (Heart rate)
    • +
    • +SLEEP_MONITOR - Sleep monitor (sleep state)
    • +
    • +PRESSURE - Pressure sensor
    • +
    +
    -

    1.2. PedometerStepStatus

    +

    1.3. PedometerStepStatus

    Specifies the pedometer user's current movement type.
    -
        enum PedometerStepStatus { "NOT_MOVING", "WALKING", "RUNNING" };
    +
        enum PedometerStepStatus { "NOT_MOVING", "WALKING", "RUNNING", "UNKNOWN" };

    Since: 2.3 @@ -205,18 +287,23 @@ NOT_MOVING - The user remains stationary WALKING - The user is walking

  • RUNNING - The user is running
  • +
  • +UNKNOWN - The user's movement type is uncertain
  • +

    Remark : + UNKNOWN is supported since Tizen 2.3.2 +

    -

    1.3. ActivityRecognitionType

    +

    1.4. ActivityRecognitionType

    Specifies the supported activity recognition types.
        enum ActivityRecognitionType { "STATIONARY", "WALKING", "RUNNING", "IN_VEHICLE" };

    Since: - 3.0 + 2.3.2

    @@ -235,14 +322,14 @@ IN_VEHICLE - The in-vehicle activity recognition type

    -

    1.4. ActivityAccuracy

    +

    1.5. ActivityAccuracy

    Specified the degree of the accuracy.
        enum ActivityAccuracy { "LOW", "MEDIUM", "HIGH" };

    Since: - 3.0 + 2.3.2

    @@ -259,14 +346,14 @@ HIGH - High accuracy

    -

    1.5. SleepStatus

    +

    1.6. SleepStatus

    Specifies the sleep monitor user's sleep status.
        enum SleepStatus { "ASLEEP", "AWAKE", "UNKNOWN" };

    Since: - 3.0 + 2.3.2

      @@ -321,17 +408,26 @@ The tizen.humanactivitymonitor object allows access to the human activi void getHumanActivityData(HumanActivityType type, HumanActivityMonitorSuccessCallback successCallback, optional ErrorCallback? errorCallback) raises(WebAPIException); - void start(HumanActivityType type, optional HumanActivityMonitorSuccessCallback? changedCallback, optional ErrorCallback? errorCallback, optional HumanActivityMonitorOption? option) raises(WebAPIException); + void start(HumanActivityType type, optional HumanActivityMonitorSuccessCallback? changedCallback, optional ErrorCallback? errorCallback, optional HumanActivityMonitorOption? option) raises(WebAPIException); + + void stop(HumanActivityType type) raises(WebAPIException); + + void setAccumulativePedometerListener(HumanActivityMonitorSuccessCallback changeCallback) raises(WebAPIException); - void stop(HumanActivityType type) raises(WebAPIException); + void unsetAccumulativePedometerListener() raises(WebAPIException); - void setAccumulativePedometerListener(HumanActivityMonitorSuccessCallback changeCallback) raises(WebAPIException); + long addActivityRecognitionListener(ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback) raises(WebAPIException); - void unsetAccumulativePedometerListener() raises(WebAPIException); + void removeActivityRecognitionListener(long listenerId, optional ErrorCallback? errorCallback); - long addActivityRecognitionListener(ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback) raises(WebAPIException); + void startRecorder(HumanActivityRecorderType type, optional HumanActivityRecorderOption option) raises(WebAPIException); - void removeActivityRecognitionListener(long listenerId, optional ErrorCallback? errorCallback); + void stopRecorder(HumanActivityRecorderType type) raises(WebAPIException); + + void readRecorderData(HumanActivityRecorderType type, + HumanActivityRecorderQuery? query, + HumanActivityReadRecorderSuccessCallback successCallback, + optional ErrorCallback? errorCallback) raises(WebAPIException); };

      Since: @@ -383,7 +479,7 @@ The ErrorCallback method is launched with these error types:

      Parameters:

      • -type: +type: Human activity data type to read (HRM or PEDOMETER)
      • @@ -481,7 +577,7 @@ That means that both 'http://tizen.org/privilege/healthinfo' and 'http For other types, only 'http://tizen.org/privilege/healthinfo' should be declared.

        Remark : - errorCallback and option are supported since Tizen 3.0. + errorCallback and option are supported since Tizen 2.3.2.

        Parameters:

        @@ -499,11 +595,11 @@ For other types, only 'http://tizen.org/privilege/healthinfo' should be d Callback method to be invoked when new human activity data is available
        Note that the listener is not called for the successful start of a human activity sensor.
      • -errorCallback [optional] [nullable]: +errorCallback [optional] [nullable]: Callback method to be invoked when an error occurs
      • -option [optional] [nullable]: +option [optional] [nullable]: The option to set the period and the interval for several human activity types
        By default, this parameter is set to null.
      @@ -745,7 +841,7 @@ Note that the setAccumulativePedometerListener() method does not need to call th

    Since: - 3.0 + 2.3.2

    @@ -825,7 +921,7 @@ The ErrorCallback method is launched with this error type:

    Since: - 3.0 + 2.3.2

    @@ -878,6 +974,251 @@ The ErrorCallback method is launched with this error type:

    +
    +startRecorder +
    +
    +
    + Starts recording human activity data for a given human activity type. +
    +
    void startRecorder(HumanActivityRecorderType type, optional HumanActivityRecorderOption option);
    +             
    +

    + Since: + 2.3.2 +

    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/healthinfo +

    +
    +

    Parameters:

    +
      +
    • +type: + Human activity type to record +
    • +
    • +option [optional]: + The option to set an interval and a period for retention +
    • +
    +
    +
    +

    Exceptions:

    +
    • WebAPIException
        +
      • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

      • +
      • + with error type SecurityError, if the application does not have the privilege to use this function. +

      • +
      • + with error type NotSupportedError, if the human activity recorder type is not supported. +

      • +
      • + with error type AbortError, if the system operation was aborted. +

      • +
      • + with error type ServiceNotAvailableError, if the human activity recorder type is already started by any application of a package. +

      • +
      • + with error type InvalidValuesError, if any of the input parameters contain an invalid value. +

      • +
      +
    +
    +
    +

    Code example:

    +var type = 'PRESSURE';
    +var options =
    +{
    +   retentionPeriod: 1 /* 1 hour */
    +};
    +try
    +{
    +   tizen.humanactivitymonitor.startRecorder(type, options);
    +}
    +catch (err)
    +{
    +   console.log(err.name + ': ' + err.message);
    +}
    +
    +
    +
    +
    +stopRecorder +
    +
    +
    + Stops recording human activity data for a given human activity type. +
    +
    void stopRecorder(HumanActivityRecorderType type);
    +             
    +

    + Since: + 2.3.2 +

    +
    +

    Parameters:

    +
      +
    • +type: + Human activity type to stop recording +
    • +
    +
    +
    +

    Exceptions:

    +
    • WebAPIException
        +
      • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

      • +
      • + with error type NotSupportedError, if the human activity recorder type is not supported. +

      • +
      • + with error type AbortError, if the system operation was aborted. +

      • +
      +
    +
    +
    +

    Code example:

    +var type = 'PRESSURE';
    +try
    +{
    +   tizen.humanactivitymonitor.startRecorder(type);
    +
    +   /* Do something */
    +
    +   tizen.humanactivitymonitor.stopRecorder(type);
    +}
    +catch (err)
    +{
    +   console.log(err.name + ': ' + err.message);
    +}
    +
    +
    +
    +
    +readRecorderData +
    +
    +
    + Reads the recorded human activity data with some query. +
    +
    void readRecorderData(HumanActivityRecorderType type, HumanActivityRecorderQuery? query, HumanActivityReadRecorderSuccessCallback successCallback, optional ErrorCallback? errorCallback);
    +             
    +

    + Since: + 2.3.2 +

    +
    +

    +If another application has recorded data for a particular human activity type, your application can read that data. +Therefore, you can use this method to read without calling startRecorder(). +

    +

    +The ErrorCallback method is launched with these error types: +

    +
      +
    • +AbortError: If the system operation was aborted while reading data asynchronously.
    • +
    • +NotFoundError: If no recorder data is available.
    • +
    +
    +

    + Privilege level: + public +

    +

    + Privilege: + http://tizen.org/privilege/healthinfo +

    +
    +

    Parameters:

    +
      +
    • +type: + Human activity type to record +
    • +
    • +query [nullable]: + The query to use +
    • +
    • +successCallback: + Callback method to be invoked when recorded human activity data is successfully read +
    • +
    • +errorCallback [optional] [nullable]: + Callback method to be invoked when an error occurs +
    • +
    +
    +
    +

    Exceptions:

    +
    • WebAPIException
        +
      • + with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter. +

      • +
      • + with error type SecurityError, if the application does not have the privilege to use this function. +

      • +
      • + with error type NotSupportedError, if the human activity recorder type is not supported. +

      • +
      • + with error type AbortError, if the system operation was aborted when it is requested to read data. +

      • +
      • + with error type InvalidValuesError, if any of the input parameters contain an invalid value. +

      • +
      +
    +
    +
    +

    Code example:

    +function onerror(error)
    +{
    +   console.log(error.name + ": " + error.message);
    +}
    +
    +function onread(data)
    +{
    +   for (var idx = 0; idx < data.length; ++idx)
    +   {
    +      console.log('startTime: ' + data[idx].startTime);
    +      console.log('endTime: ' + data[idx].endTime);
    +      console.log('calories: ' + data[idx].calorie);
    +   }
    +}
    +
    +var type = 'PEDOMETER';
    +var query = {};
    +try
    +{
    +   tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
    +}
    +catch (err)
    +{
    +   console.log(err.name + ': ' + err.message);
    +}
    +
    +
    +
    +

    Output example:

     startTime: 1420311755
    + endTime: 1420313238
    + calories: 24.83
    + 
    +
    +
    @@ -922,34 +1263,246 @@ The ErrorCallback method is launched with this error type: -
    -

    2.4. HumanActivityData

    +
    +

    2.4. HumanActivityRecorderOption

    - The HumanActivityData interface is a common abstract interface used by the different types of human activity data. + The HumanActivityRecorderOption dictionary contains options, such as the interval, to use with startRecorder().
    -
        [NoInterfaceObject] interface HumanActivityData {
    +
        dictionary HumanActivityRecorderOption {
    +
    +        long interval;
    +
    +        long retentionPeriod;
         };

    Since: - 2.3 + 2.3.2

    +
    +

    Code example:

    +var option =
    +{
    +   interval: 10,
    +   retentionPeriod: 1
    +}
    +
    -
    -

    2.5. HumanActivityPedometerData

    +
    +

    Dictionary members

    +
    +
    long interval
    +
    - The HumanActivityPedometerData interface represents pedometer data. + Interval in minutes at which human activity recorder data will be recorded. +
    +
    +

    +For the HRM type, the interval can be between 10 and 1440 (1 day) inclusive.
    If interval is not specified, it is set to the default value of 1440 minutes (1 day).
    For other human activity recorder types, interval will be ignored. +

    +
    +

    + Since: + 2.3.2 +

    +

    Remark : + The specified interval is only a suggested interval between sensor measurements. +You will get at least one sensor measurement within the interval you specify, but the actual interval between sensor measurements can be affected by other applications and the system. +To reduce the system overhead, it is recommended to set the longest interval that you can, because the system usually chooses the shortest interval among all intervals specified. +

    +
    +
    long retentionPeriod
    +
    +
    + Retention period in hours for which human activity recorder data should be retained. +
    +
    +

    +The retentionPeriod can be between 1 and 744 (31 days) inclusive.
    If retentionPeriod is not specified, it is set to the default value of 1 hour. +

    +
    +

    + Since: + 2.3.2 +

    +
    +
    +
    +
    +
    +

    2.5. HumanActivityRecorderQuery

    +
    + The HumanActivityRecorderQuery dictionary contains query, such as the startTime, the endTime, the anchorTime and the interval, to use with readRecorderData().
    -
        [NoInterfaceObject] interface HumanActivityPedometerData : HumanActivityData {
    -
    -        readonly attribute PedometerStepStatus stepStatus;
    +
        dictionary HumanActivityRecorderQuery {
     
    -        readonly attribute double speed;
    +        long startTime;
     
    -        readonly attribute double walkingFrequency;
    +        long endTime;
     
    -        readonly attribute double cumulativeDistance;
    +        long anchorTime;
     
    -        readonly attribute double cumulativeCalorie;
    +        long interval;
    +    };
    +

    + Since: + 2.3.2 +

    +
    +

    Dictionary members

    +
    +
    long startTime
    +
    +
    + The start time of the data to be queried. Epoch time in seconds. +
    +
    +

    +The startTime should be greater than or equal to zero.
    If startTime is not specified, it is set to the default value of 1 day ago. +

    +
    +

    + Since: + 2.3.2 +

    +
    +
    long endTime
    +
    +
    + The end time of the date to be queried. Epoch time in seconds. +
    +
    +

    +The endTime should be greater than startTime.
    If endTime in not specified, it is set to the current time. +

    +
    +

    + Since: + 2.3.2 +

    +
    +
    long anchorTime
    +
    +
    + The anchor point to slice the read data. Epoch time in seconds. +
    +
    +

    +For the PEDOMETER and PRESSURE type, the anchorTime can only be used.
    The anchorTime should be greater than or equal to zero.
    If anchorTime is not specified, it will be set to the endTime. +

    +

    +The interval will extend away from the anchorTime in both directions. +The exact date does not matter for the anchorTime. +This is because the anchorTime is used in combination with the interval. +For example, the anchorTime can be 1:00 am, January 1, 2000 or 1:00 am, August 15, 2010 with a 1 day interval. In both cases, the anchorTime will be 1:00 am internally. +

    +

    +query example

    +
    +

    + Since: + 2.3.2 +

    +
    +

    Code example:

    +function onerror(error)
    +{
    +   console.log(error.name + ": " + error.message);
    +}
    +
    +function onread(data)
    +{
    +   for (var idx = 0; idx < data.length; ++idx)
    +   {
    +      console.log("*** " + idx);
    +      console.log('totalStepCount: ' + data[idx].totalStepCount);
    +   }
    +}
    +
    +var type = 'PEDOMETER';
    +var now = new Date();
    +var startTime = now.setDate(now.getDate() - 7);
    +var anchorTime = (new Date(2000, 1, 2, 6)).getTime();
    +var query =
    +{
    +   startTime: startTime / 1000,
    +   anchorTime: anchorTime / 1000,
    +   interval: 1440 /* 1 day */
    +};
    +try
    +{
    +   tizen.humanactivitymonitor.readRecorderData(type, query, onread, onerror);
    +}
    +catch (err)
    +{
    +   console.log(err.name + ': ' + err.message);
    +}
    +
    +
    +
    +

    Output example:

     *** 0
    + totalStepCount: 3860
    + *** 1
    + totalStepCount: 6705
    + *** 2
    + totalStepCount: 4005
    + *** 3
    + totalStepCount: 2328
    + *** 4
    + totalStepCount: 4705
    + *** 5
    + totalStepCount: 6446
    + *** 6
    + totalStepCount: 4103
    + *** 7
    + totalStepCount: 1456
    + 
    +
    +
    +
    long interval
    +
    +
    + Interval in minutes at which human activity recorder data will be read. +
    +
    +

    +The interval should be greater than or equal to zero.
    For the PEDOMETER and PRESSURE type, if interval is not specified, it is set to the difference between endTime and startTime.
    For the PRESSURE type, if it is set to zero, all raw data recorded from startTime to endTime will be returned.
    For other recorder types, interval will be ignored.

    +
    +

    + Since: + 2.3.2 +

    +
    +
    +
    +
    +
    +

    2.6. HumanActivityData

    +
    + The HumanActivityData interface is a common abstract interface used by the different types of human activity data. +
    +
        [NoInterfaceObject] interface HumanActivityData {
    +    };
    +

    + Since: + 2.3 +

    +
    +
    +

    2.7. HumanActivityPedometerData

    +
    + The HumanActivityPedometerData interface represents pedometer data. +
    +
        [NoInterfaceObject] interface HumanActivityPedometerData : HumanActivityData {
    +
    +        readonly attribute PedometerStepStatus stepStatus;
    +
    +        readonly attribute double speed;
    +
    +        readonly attribute double walkingFrequency;
    +
    +        readonly attribute double cumulativeDistance;
    +
    +        readonly attribute double cumulativeCalorie;
     
             readonly attribute double cumulativeTotalStepCount;
     
    @@ -963,7 +1516,7 @@ The ErrorCallback method is launched with this error type:
                 Since: 
      2.3
               

    - +

    Attributes

      @@ -1067,7 +1620,7 @@ The value is the sum of cumulativeWalkStepCount and cumulativeRunSt
    -

    2.6. HumanActivityAccumulativePedometerData

    +

    2.8. HumanActivityAccumulativePedometerData

    The HumanActivityAccumulativePedometerData interface represents pedometer motion data since the device is booted.
    @@ -1095,7 +1648,7 @@ The value is the sum of cumulativeWalkStepCount and cumulativeRunSt Since: 2.3

    - +

    Attributes

      @@ -1199,7 +1752,7 @@ The value is the sum of accumulativeWalkStepCount and accumulativeR
    -

    2.7. HumanActivityHRMData

    +

    2.9. HumanActivityHRMData

    The HumanActivityHRMData interface represents Heart Rate Monitor(HRM) data.
    @@ -1213,7 +1766,7 @@ The value is the sum of accumulativeWalkStepCount and accumulativeR Since: 2.3

    - +

    Attributes

      @@ -1242,7 +1795,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    -

    2.8. HumanActivityGPSInfo

    +

    2.10. HumanActivityGPSInfo

    The HumanActivityGPSInfo interface represents GPS information.
    @@ -1331,7 +1884,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    -

    2.9. HumanActivityGPSInfoArray

    +

    2.11. HumanActivityGPSInfoArray

    The HumanActivityGPSInfoArray interface represents GPS information array.
    @@ -1343,7 +1896,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user Since: 2.3

    - +

    Attributes

    • @@ -1360,7 +1913,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    -

    2.10. HumanActivitySleepMonitorData

    +

    2.12. HumanActivitySleepMonitorData

    The HumanActivitySleepMonitorData interface represents sleep monitor data.
    @@ -1372,12 +1925,12 @@ When a user takes off the watch device, the heartRate is set to -3. When a user };

    Since: - 3.0 + 2.3.2

    Remark : If the device's display is off, multiple callbacks consisting of sleep monitor data are all invoked at once at a device specific interval. There is a callback for each minute in the interval. For example, if the device's interval is 20 minutes, 20 callbacks will be invoked every 20 minutes. When the display is turned on, all callbacks which have not been invoked are invoked and the callback is invoked every one minute from then on. Therefore, if the display is turned on at 25 minutes, five callbacks will be invoked.

    - +

    Attributes

      @@ -1388,7 +1941,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user

    Since: - 3.0 + 2.3.2

  • @@ -1398,14 +1951,14 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
  • Since: - 3.0 + 2.3.2

    -

    2.11. HumanActivityMonitorOption

    +

    2.13. HumanActivityMonitorOption

    The HumanActivityMonitorOption dictionary contains options, such as the callbackInterval and the sampleInterval, to use with start().
    @@ -1417,7 +1970,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user };

    Since: - 3.0 + 2.3.2

    Dictionary members

    @@ -1425,11 +1978,11 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    long callbackInterval
    - The interval in milliseconds (ms) at which human activity data will be sent to the Web Application.
    For the GPS type, callbackInterval should be greater than or equal to the sampleInterval. The maximum permissible value for callbackInterval is device specific. If callbackInterval is not specified or zero, it is set to the default value of 150000ms. The callbackInterval will be ignored when the display is on. Instead, The callbackInterval will be set to the sampleInterval.
    For the HRM type, callbackInterval can be between 10ms and 1000ms inclusive, however, if it not specified or zero, it is set set by the default value of 100ms.
    For other activity types, callbackInterval will be ignored. + The interval in milliseconds (ms) at which human activity data will be sent to the Web Application.
    For the GPS type, callbackInterval should be greater than or equal to the sampleInterval. The maximum permissible value for callbackInterval is device specific. If callbackInterval is not specified or zero, it is set to the default value of 150000ms. The callbackInterval will be ignored when the display is on. Instead, The callbackInterval will be set to the sampleInterval.
    For the HRM type, callbackInterval can be between 10ms and 1000ms inclusive, however, if it not specified or zero, it is set by the default value of 100ms.
    For other activity types, callbackInterval will be ignored.

    Since: - 3.0 + 2.3.2

    Remark : The specified interval is only a suggested interval between sensor measurements. You will get at least one sensor measurement within the interval you specify, but the actual interval between sensor measurements can be affected by other applications and the system. To reduce the system overhead, it is recommended to set the longest interval that you can, because the system usually chooses the shortest interval among all intervals specified. @@ -1442,14 +1995,14 @@ When a user takes off the watch device, the heartRate is set to -3. When a user

    Since: - 3.0 + 2.3.2

    -

    2.12. HumanActivityRecognitionData

    +

    2.14. HumanActivityRecognitionData

    The HumanActivityRecognitionData interface represents a activity recognition data.
    @@ -1463,9 +2016,9 @@ When a user takes off the watch device, the heartRate is set to -3. When a user };

    Since: - 3.0 + 2.3.2

    - +

    Attributes

      @@ -1476,7 +2029,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user

    Since: - 3.0 + 2.3.2

  • @@ -1486,7 +2039,7 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
  • Since: - 3.0 + 2.3.2

  • @@ -1496,14 +2049,243 @@ When a user takes off the watch device, the heartRate is set to -3. When a user

    Since: - 3.0 + 2.3.2 +

    +
  • + + + +
    +

    2.15. HumanActivityRecorderData

    +
    + The HumanActivityRecorderData interface is a common abstract interface used for the different types of human activity recorder data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderData {
    +
    +        readonly attribute long startTime;
    +
    +        readonly attribute long endTime;
    +    };
    +

    + Since: + 2.3.2 +

    +
    +

    Attributes

    +
      +
    • + readonly +long startTime
      + Recording start time of the data in this HumanActivityRecorderData object. Epoch time in seconds. +
      +

      + Since: + 2.3.2 +

      +
    • +
    • + readonly +long endTime
      + Recording end time of the data in this HumanActivityRecorderData object. Epoch time in seconds. +
      +

      + Since: + 2.3.2 +

      +
    • +
    +
    +
    +
    +

    2.16. HumanActivityRecorderPedometerData

    +
    + The HumanActivityRecorderPedometerData interface represents recorded PEDOMETER data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderPedometerData : HumanActivityRecorderData {
    +
    +        readonly attribute double distance;
    +
    +        readonly attribute double calorie;
    +
    +        readonly attribute double totalStepCount;
    +
    +        readonly attribute double walkStepCount;
    +
    +        readonly attribute double runStepCount;
    +    };
    +

    + Since: + 2.3.2 +

    + +
    +

    Attributes

    +
      +
    • + readonly +double distance
      + Distance traveled from startTime to endTime in meters. +
      +

      + Since: + 2.3.2 +

      +
    • +
    • + readonly +double calorie
      + Calories burned from startTime to endTime in kCal. +
      +

      + Since: + 2.3.2 +

      +
    • +
    • + readonly +double totalStepCount
      + Walking and running step count from startTime to endTime. The value is the sum of walkingStepCount and runningStepCount. +
      +

      + Since: + 2.3.2 +

      +
    • +
    • + readonly +double walkStepCount
      + Walking step count from startTime to endTime. +
      +

      + Since: + 2.3.2 +

      +
    • +
    • + readonly +double runStepCount
      + Running step count from startTime to endTime. +
      +

      + Since: + 2.3.2 +

      +
    • +
    +
    +
    +
    +

    2.17. HumanActivityRecorderHRMData

    +
    + The HumanActivityRecorderHRMData interface represents a recorded HRM data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderHRMData : HumanActivityRecorderData {
    +
    +        readonly attribute long heartRate;
    +    };
    +

    + Since: + 2.3.2 +

    + +
    +

    Attributes

    +
    • + readonly +long heartRate
      + Heart rate in beats per minute. +
      +

      + Since: + 2.3.2 +

      +
    +
    +
    +
    +

    2.18. HumanActivityRecorderSleepMonitorData

    +
    + The HumanActivityRecorderSleepMonitorData interface represents a recorded SLEEP_MONITOR data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderSleepMonitorData : HumanActivityRecorderData {
    +
    +        readonly attribute SleepStatus status;
    +    };
    +

    + Since: + 2.3.2 +

    + +
    +

    Attributes

    +
    • + readonly +SleepStatus status
      + The sleep status. +
      +

      + Since: + 2.3.2 +

      +
    +
    +
    +
    +

    2.19. HumanActivityRecorderPressureData

    +
    + The HumanActivityRecorderPressureData interface represents a recorded PRESSURE data. +
    +
        [NoInterfaceObject] interface HumanActivityRecorderPressureData : HumanActivityRecorderData {
    +
    +        readonly attribute double? max;
    +
    +        readonly attribute double? min;
    +
    +        readonly attribute double? average;
    +    };
    +

    + Since: + 2.3.2 +

    + +
    +

    Attributes

    +
      +
    • + readonly +double max [nullable]
      + Max pressure in hectopascal (hPa). +
      +

      + Since: + 2.3.2 +

      +
    • +
    • + readonly +double min [nullable]
      + Min pressure in hectopascal (hPa). +
      +

      + Since: + 2.3.2 +

      +
    • +
    • + readonly +double average [nullable]
      + Average pressure in hectopascal (hPa). +
      +

      + Since: + 2.3.2

    -

    2.13. HumanActivityMonitorSuccessCallback

    +

    2.20. HumanActivityMonitorSuccessCallback

    The HumanActivityMonitorSuccessCallback interface is a callback interface that is invoked when new human activity data is available.
    @@ -1544,6 +2326,48 @@ When a user takes off the watch device, the heartRate is set to -3. When a user
    +
    +

    2.21. HumanActivityReadRecorderSuccessCallback

    +
    + The HumanActivityReadRecorderSuccessCallback interface is a callback interface that is invoked when recorded human activity data is successfully read. +
    +
        [Callback=FunctionOnly, NoInterfaceObject] interface HumanActivityReadRecorderSuccessCallback {
    +
    +        void onsuccess(HumanActivityRecorderData[] humanactivitydata);
    +    };
    +

    + Since: + 2.3 +

    +
    +

    Methods

    +
    +
    +onsuccess +
    +
    +
    + Called when recorded human activity data is successfully read. +
    +
    void onsuccess(HumanActivityRecorderData[] humanactivitydata);
    +             
    +

    + Since: + 2.3 +

    +
    +

    Parameters:

    +
      +
    • +humanactivitydata: + Recorded human activity data. +
    • +
    +
    +
    +
    +
    +

    3. Related Feature

    @@ -1604,6 +2428,14 @@ To guarantee that the human sleep state tracking application runs on a device wi

  • http://tizen.org/feature/sensor.sleep_monitor
  • +
    +

    +

    +To guarantee that the barometer(pressure) sensor application runs on a device with a barometric (pressure) sensor, declare the following feature requirement in the config file: +

    +

    +
  • http://tizen.org/feature/sensor.barometer
  • +

    For more information, see Application Filtering. @@ -1612,7 +2444,9 @@ To guarantee that the human sleep state tracking application runs on a device wi enum HumanActivityType { "PEDOMETER", "WRIST_UP", "HRM", "GPS", "SLEEP_MONITOR" }; - enum PedometerStepStatus { "NOT_MOVING", "WALKING", "RUNNING" }; + enum HumanActivityRecorderType { "PEDOMETER", "HRM", "SLEEP_MONITOR", "PRESSURE" }; + + enum PedometerStepStatus { "NOT_MOVING", "WALKING", "RUNNING", "UNKNOWN" }; enum ActivityRecognitionType { "STATIONARY", "WALKING", "RUNNING", "IN_VEHICLE" }; @@ -1630,17 +2464,26 @@ To guarantee that the human sleep state tracking application runs on a device wi void getHumanActivityData(HumanActivityType type, HumanActivityMonitorSuccessCallback successCallback, optional ErrorCallback? errorCallback) raises(WebAPIException); - void start(HumanActivityType type, optional HumanActivityMonitorSuccessCallback? changedCallback, optional ErrorCallback? errorCallback, optional HumanActivityMonitorOption? option) raises(WebAPIException); + void start(HumanActivityType type, optional HumanActivityMonitorSuccessCallback? changedCallback, optional ErrorCallback? errorCallback, optional HumanActivityMonitorOption? option) raises(WebAPIException); + + void stop(HumanActivityType type) raises(WebAPIException); + + void setAccumulativePedometerListener(HumanActivityMonitorSuccessCallback changeCallback) raises(WebAPIException); - void stop(HumanActivityType type) raises(WebAPIException); + void unsetAccumulativePedometerListener() raises(WebAPIException); - void setAccumulativePedometerListener(HumanActivityMonitorSuccessCallback changeCallback) raises(WebAPIException); + long addActivityRecognitionListener(ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback) raises(WebAPIException); - void unsetAccumulativePedometerListener() raises(WebAPIException); + void removeActivityRecognitionListener(long listenerId, optional ErrorCallback? errorCallback); - long addActivityRecognitionListener(ActivityRecognitionType type, HumanActivityMonitorSuccessCallback listener, optional ErrorCallback? errorCallback) raises(WebAPIException); + void startRecorder(HumanActivityRecorderType type, optional HumanActivityRecorderOption option) raises(WebAPIException); - void removeActivityRecognitionListener(long listenerId, optional ErrorCallback? errorCallback); + void stopRecorder(HumanActivityRecorderType type) raises(WebAPIException); + + void readRecorderData(HumanActivityRecorderType type, + HumanActivityRecorderQuery? query, + HumanActivityReadRecorderSuccessCallback successCallback, + optional ErrorCallback? errorCallback) raises(WebAPIException); }; [NoInterfaceObject] interface StepDifference { @@ -1650,12 +2493,30 @@ To guarantee that the human sleep state tracking application runs on a device wi readonly attribute long timestamp; }; + dictionary HumanActivityRecorderOption { + + long interval; + + long retentionPeriod; + }; + + dictionary HumanActivityRecorderQuery { + + long startTime; + + long endTime; + + long anchorTime; + + long interval; + }; + [NoInterfaceObject] interface HumanActivityData { }; - [NoInterfaceObject] interface HumanActivityPedometerData : HumanActivityData { + [NoInterfaceObject] interface HumanActivityPedometerData : HumanActivityData { - readonly attribute PedometerStepStatus stepStatus; + readonly attribute PedometerStepStatus stepStatus; readonly attribute double speed; @@ -1671,12 +2532,12 @@ To guarantee that the human sleep state tracking application runs on a device wi readonly attribute double cumulativeRunStepCount; - readonly attribute StepDifference[] stepCountDifferences; + readonly attribute StepDifference[] stepCountDifferences; }; - [NoInterfaceObject] interface HumanActivityAccumulativePedometerData : HumanActivityData { + [NoInterfaceObject] interface HumanActivityAccumulativePedometerData : HumanActivityData { - readonly attribute PedometerStepStatus stepStatus; + readonly attribute PedometerStepStatus stepStatus; readonly attribute double speed; @@ -1692,10 +2553,10 @@ To guarantee that the human sleep state tracking application runs on a device wi readonly attribute double accumulativeRunStepCount; - readonly attribute StepDifference[] stepCountDifferences; + readonly attribute StepDifference[] stepCountDifferences; }; - [NoInterfaceObject] interface HumanActivityHRMData : HumanActivityData { + [NoInterfaceObject] interface HumanActivityHRMData : HumanActivityData { readonly attribute long heartRate; @@ -1717,12 +2578,12 @@ To guarantee that the human sleep state tracking application runs on a device wi readonly attribute long timestamp; }; - [NoInterfaceObject] interface HumanActivityGPSInfoArray : HumanActivityData { + [NoInterfaceObject] interface HumanActivityGPSInfoArray : HumanActivityData { - readonly attribute HumanActivityGPSInfo[] gpsInfo; + readonly attribute HumanActivityGPSInfo[] gpsInfo; }; - [NoInterfaceObject] interface HumanActivitySleepMonitorData : HumanActivityData { + [NoInterfaceObject] interface HumanActivitySleepMonitorData : HumanActivityData { readonly attribute SleepStatus status; @@ -1736,20 +2597,64 @@ To guarantee that the human sleep state tracking application runs on a device wi long sampleInterval; }; - [NoInterfaceObject] interface HumanActivityRecognitionData : HumanActivityData { - readonly attribute ActivityRecognitionType type; + [NoInterfaceObject] interface HumanActivityRecognitionData : HumanActivityData { + + readonly attribute ActivityRecognitionType type; readonly attribute long timestamp; - readonly attribute ActivityAccuracy accuracy; + readonly attribute ActivityAccuracy accuracy; + }; + + [NoInterfaceObject] interface HumanActivityRecorderData { + + readonly attribute long startTime; + + readonly attribute long endTime; + }; + + [NoInterfaceObject] interface HumanActivityRecorderPedometerData : HumanActivityRecorderData { + + readonly attribute double distance; + + readonly attribute double calorie; + + readonly attribute double totalStepCount; + + readonly attribute double walkStepCount; + + readonly attribute double runStepCount; + }; + + [NoInterfaceObject] interface HumanActivityRecorderHRMData : HumanActivityRecorderData { + + readonly attribute long heartRate; + }; + + [NoInterfaceObject] interface HumanActivityRecorderSleepMonitorData : HumanActivityRecorderData { + + readonly attribute SleepStatus status; + }; + + [NoInterfaceObject] interface HumanActivityRecorderPressureData : HumanActivityRecorderData { + + readonly attribute double? max; + + readonly attribute double? min; + + readonly attribute double? average; }; [Callback=FunctionOnly, NoInterfaceObject] interface HumanActivityMonitorSuccessCallback { - void onsuccess(optional HumanActivityData? humanactivitydata); + void onsuccess(optional HumanActivityData? humanactivitydata); }; + [Callback=FunctionOnly, NoInterfaceObject] interface HumanActivityReadRecorderSuccessCallback { + + void onsuccess(HumanActivityRecorderData[] humanactivitydata); + }; };