[英]Android AlarmManager WAKEUP
I use the code: 我使用代码:
AlarmManager alarmManager = (AlarmManager) context
.getSystemService(Context.ALARM_SERVICE);
alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
0, 60000, alarmIntent);
How long will the phone to stay awake after the timer? 计时器过后电话将保持多长时间唤醒?
You can't rely on any information from this point of view. 从这个角度来看,您不能依赖任何信息。 If your pending intent is for a broadcast receiver, you should use a wakefulBroadcastReceiver ( doc here ) taking your own wakelock, start an intent service for example and release the lock. 如果您的未决意图是用于广播接收器,则应使用wakefulBroadcastReceiver( 此处为doc )获取自己的唤醒锁,例如启动意图服务并释放锁。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.