# Power Management >![](../../public_sys-resources/icon-note.gif) **NOTE:** >The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import ``` import power from '@ohos.power'; ``` ## Required Permissions Shutdown: ohos.permission.SHUTDOWN Reboot: ohos.permission.REBOOT Reboot and entering the recovery mode: ohos.permission.REBOOT\_RECOVERY ## power.shutdownDevice shutdownDevice\(reason: string\): void Shuts down the system. - Parameters

Name

Type

Mandatory

Description

reason

string

Yes

Reason for system shutdown.

- Example ``` power.shutdownDevice("shutdown_test"); console.info('power_shutdown_device_test success') ``` ## power.rebootDevice rebootDevice\(reason: string\): void Reboots the system. - Parameters

Name

Type

Mandatory

Description

reason

string

Yes

Reason for system reboot.

- Example ``` power.rebootDevice("reboot_test"); console.info('power_reboot_device_test success') ``` ## power.isScreenOn isScreenOn\(callback: AsyncCallback\): void Checks the screen status of the current device. - Parameters

Type

Type

Mandatory

Description

callback

AsyncCallback<boolean>

Yes

Callback used to obtain the return value.

The value true indicates that the screen is on, and value false indicates the opposite.

- Example ``` power.isScreenOn((error, screenOn) => { if (typeof error === "undefined") { console.info('screenOn status is ' + screenOn); } else { console.log('error: ' + error); } }) ``` ## power.isScreenOn isScreenOn\(\): Promise Checks the screen status of the current device. - Return values

Type

Description

Promise<boolean>

Promise used to asynchronously obtain the return value. The value true indicates that the screen is on, and value false indicates the opposite.

- Example ``` power.isScreenOn() .then(screenOn => { console.info('screenOn status is ' + screenOn); }) .catch(error => { console.log('error: ' + error); }) ```