Skip to main content
Version: v3+

setWakeUpRelaunch

Start from API_LEVEL 2.0 . Please refer to API_LEVEL.

By default, the system will off the screen in one page of the Mini Program, and the system will exit the Mini Program after 10s, and enter the dial page when the watch is woken up again. If relaunch is set to true, the Mini Program will reopen and enter the corresponding page when the watch is woken up again.

Type​

function setWakeUpRelaunch(option: Option): void

Simplified calling method​

function setWakeUpRelaunch(relaunch: boolean): void

Parameters​

Option​

TypeDescription
Options|booleantrue - auto-brightness is set to on, false - auto-brightness is set to off

Options​

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
relaunchbooleanY-Whether to reopen the Mini Program after waking up the watch again after a screen break2.0

Example​

import { setWakeUpRelaunch } from '@zos/display'

setWakeUpRelaunch({
relaunch: true,
})