How to detect STAMINA mode?

前端 未结 2 823
耶瑟儿~
耶瑟儿~ 2021-02-13 14:30

Can you help me, how to programmatically detect STAMINA mode on Sony devices?

I want to notify user that my app will not work properly if STAMINA is ON because it\'s blo

2条回答
  •  故里飘歌
    2021-02-13 14:42

    I would like to know this too. I guess a naive way would be to check when the app was actually last awakened by AlarmManager and compare it to when you expected it to run. Keep track of shutdown and boot events to know if the phone was off.

提交回复
热议问题