读书人

Android接收电池状态变更通知

发布时间: 2012-06-27 14:20:08 作者: rapoo

Android接收电池状态变化通知

注册接收广播

You can?not?receive this through components declared in manifests, only by explicitly registering for it with?Context.registerReceiver(). See?ACTION_BATTERY_LOW,ACTION_BATTERY_OKAY,?ACTION_POWER_CONNECTED, and?ACTION_POWER_DISCONNECTED?for distinct battery-related broadcasts that are sent and can be received through manifest receivers.

?

参考

http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED?

读书人网 >Android

热点推荐