Skip to main content
Version: v3+

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​

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
idnumberY-Vertical axis coordinates of the page3.0

Result​

TypeDescription
numberIf 0 is returned, success is indicated

Example​

import { cancel } from '@zos/alarm'

cancel(id)