Screensaver
Enable, disable, and configure the screensaver.
Not all methods are supported on all devices. If a method is not supported, it will throw UnsupportedOperationException. For example:
val screensaver = Screensaver(context)
try {
screensaver.gotoSleep()
// Supported on this device
} catch (e: UnsupportedOperationException) {
// Not supported on this device
}Content copied to clipboard
Alternatively, you can check if the methods in this class are supported by inspecting supported.
All methods are blocking and should be invoked on a background thread.
Properties
Functions
Link copied to clipboard
Get the active dream components.
Link copied to clipboard
Link copied to clipboard
Get secure settings related to the screensaver.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Set the active dream component.
Link copied to clipboard
Link copied to clipboard
Set secure settings related to the screensaver.