Samsung Electronics logo

Power: Accessing the Device Power Resource

Samsung Web API enables you to access a device's power resource using the Power API. Currently, the screen and CPU power resources are supported, allowing you to request a specific power state and control the brightness of the screen.

The Power API allows you to request and release a minimum power state for the screen and CPU. The request locks the screen to a minimum state and keeps the device bright and awake. For example, if you set the minimum power state to SCREEN_NORMAL, the device display always remains in the SCREEN_BRIGHT or SCREEN_NORMAL level and never goes down to the SCREEN_DIM level.

The levels you can request are described in the following table.

Table: Power state levels
Level Description
SCREEN_OFF In this state, the screen is off. You cannot request this state, but it can be used in event handlers.
SCREEN_DIM In this state, the screen is dimmed. When this state is requested, the device does not go to the SCREEN_OFF state automatically.
SCREEN_NORMAL In this state, the screen uses the default brightness the user has configured for the device. When this state is requested, the device does not go to the SCREEN_DIM state automatically.
If you request a new power state without releasing the previous state, the Samsung Web API platform follows the highest minimum state requested.