본문 바로가기

개발

[Android] Screen off 상태로 재부팅 방법

https://developer.android.com/reference/android/os/PowerManager

 

PowerManager  |  Android Developers

 

developer.android.com

reboot

Added in API level 8
 
public void reboot (String reason)

Reboot the device. Will not return if the reboot is successful.

Requires the Manifest.permission.REBOOT permission.

If the reason string contains ",quiescent", then the screen stays off during reboot and is not turned on again until the user triggers the device to wake up (for example, by pressing the power key). This behavior applies to Android TV devices launched on Android 11 (API level 30) or higher.