Android intent-filter 不能收到 ACTION_SCREEN_ON/OFF intent
這里有解釋Android does not seem to support manifest-registered receivers for cases where they really do not want to start up a new process. For example, you will see the same effect with the battery info actions (e.g., BATTERY_LOW). Beyond that, though, I don't have much rationale -- I didn't write it. :-) – CommonsWare Oct 19 '09 at 12:50
在某些intent broadcasting case下android不希望產(chǎn)生新的process(可能會(huì)導(dǎo)致系統(tǒng)響應(yīng)慢),SCREEN_ON / OFF 就屬于這樣的case。
所以在自己的activity里面registerReceiver()是處理這樣的case的正確選擇。
在某些intent broadcasting case下android不希望產(chǎn)生新的process(可能會(huì)導(dǎo)致系統(tǒng)響應(yīng)慢),SCREEN_ON / OFF 就屬于這樣的case。
所以在自己的activity里面registerReceiver()是處理這樣的case的正確選擇。
posted on 2013-03-27 16:05 wythern 閱讀(1336) 評(píng)論(0) 編輯 收藏 引用