如何检测STAMINA模式? [英] How to detect STAMINA mode?

查看:112
本文介绍了如何检测STAMINA模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以帮我,如何通过编程检测STAMINA模式的索尼设备?

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

我要通知用户,我的应用程序将无法正常工作,如果后劲,因为它的阻止AlarmManager和设备没有唤醒时,我想要的。

I want to notify user that my app will not work properly if STAMINA is ON because it's blocking AlarmManager and device is not waked up when I want.

推荐答案

我想知道这一点。我想一个天真的方法是检查时,应用程序实际上是上次惊醒AlarmManager和比较,当你希望它运行。跟踪的关机和引导事件要知道,如果手机被关闭。

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.

这篇关于如何检测STAMINA模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆