cancel
Start from API_LEVEL
3.0
. Please refer to API_LEVEL.
Cancels the set timer, if the timer is set to persist and also cancels the persistence.
info
permission code: device:os.alarm
Type
function cancel(option: Option): Result
Simplified calling method
function cancel(id: number): Result
Parameters
Option
Property | Type | Required | DefaultValue | Description | API_LEVEL |
---|---|---|---|---|---|
id | number | Y | - | Vertical axis coordinates of the page | 3.0 |
Result
Type | Description |
---|---|
number | If 0 is returned, success is indicated |
Example
import { cancel } from '@zos/alarm'
cancel(id)