powerSaveBlocker

    Process: Main

    For example:

    • type string - Power save blocker type.
      • prevent-display-sleep - Prevent the display from going to sleep. Keeps system and screen active. Example use case: playing video.

    Returns - The blocker ID that is assigned to this power blocker.

    Starts preventing the system from entering lower-power mode. Returns an integer identifying the power save blocker.

    For example, an API calling A requests for prevent-app-suspension, and another calling B requests for prevent-display-sleep. prevent-display-sleep will be used until B stops its request. After that, is used.

    • id Integer - The power save blocker id returned by powerSaveBlocker.start.

    Stops the specified power save blocker.