Android power save mode listener?

后端 未结 3 376
执笔经年
执笔经年 2021-01-12 11:04

How can an Android listener be created to perform a task just before entering power save mode? Also: what are some of the low power options that can be controlled by this ta

3条回答
  •  情歌与酒
    2021-01-12 11:41

    How can an Android listener be created to perform a task just before entering power save mode?

    There is no broadcast Intent for this. The closest is ACTION_SCREEN_OFF. The device will likely fall asleep in the near future after you receive this broadcast. And, you can only listen for this broadcast using a BroadcastReceiver registered via registerReceiver() in an activity or service or other Context.

    Also: what are some of the low power options that can be controlled by this task?

    I have no idea what this means, sorry.

提交回复
热议问题