addHealthData
Start from API_LEVEL
3.0. Please refer to API_LEVEL.
Set user health data information.
info
permission code: data:user.health
Type
function addHealthData(option: Option): Result
Parameters
Option
| Property | Type | Required | DefaultValue | Description | API_LEVEL |
|---|---|---|---|---|---|
| weight | number | Y | - | Weight, in g | 3.0 |
| bmi | number | Y | - | 100 times the value of BMI | 3.0 |
Result
| Type | Description |
|---|---|
boolean | undefined |
Example
import { addHealthData } from '@zos/user'
addHealthData({
weight: 65,
bmi: 1900,
})