setScreenTimeout

open fun setScreenTimeout(screenTimeoutMillis: Long)

Sets screen timeout in milliseconds that will be added to the predefined system timeout (that is usually 1 minute). I.e. setScreenTimeout(30 * 1000) will turn off the device screen in 90 seconds.

Parameters

screenTimeoutMillis

can be a positive number, TIMEOUT_DEFAULT or TIMEOUT_INFINITE.