Workout
Start from API_LEVEL
3.0
. Please refer to API_LEVEL.
Workout Sensor.
info
permission code: data:user.hd.workout
Methods
getStatus
Get altitude value in meters
getStatus(): Status
Status
Property | Type | Description | API_LEVEL |
---|---|---|---|
vo2Max | number | VO2 Max | 3.0 |
trainingLoad | number | Training Load | 3.0 |
fullRecoveryTime | number | Full Recovery Time | 3.0 |
getHistory
Get the duration of the workout record
getHistory(): Array<History>
History
Property | Type | Description | API_LEVEL |
---|---|---|---|
startTime | number | Workout start time | 3.0 |
duration | number | Duration of workout in seconds | 3.0 |
Example
import { Workout } from '@zos/sensor'
const workout = new Workout()
const status = workout.getStatus()
const history = workout.getHistory()