Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To close the power options System UI, you can use the following code in Kotlin:

val intent = Intent(Intent.ACTIONCLOSESYSTEM_DIALOGS) context.sendBroadcast(intent)

This will send a broadcast signal to the Android system to close any system dialog that is currently open, including the power options System UI.