Android可以在BroadcastRceiver中處理廣播時進入深度睡眠狀態嗎? 是否需要儘早在BroadcastReceiver onReceive方法中創建部分喚醒鎖,或者可以在onReceive方法中的任何位置創建它(並傳遞給服務)?Android BroadcastReceiver和深度睡眠
AlarmManager文檔狀態The Alarm Manager holds a CPU wake lock as long as the alarm receiver's onReceive() method is executing. This guarantees that the phone will not sleep until you have finished handling the broadcast.
但是其他廣播呢?或者這隻取決於廣播的發送者?
如果設備已經睡着了,它甚至可能不會醒來接收廣播:請參閱http://stackoverflow.com/questions/16254420/broadcastreceiver-behavior-when-phone-is-asleep – 2013-05-04 22:31:05