摘要: 使用动态注册监听系统广播(电池的广播)当电池时间改变的时候系统将发出广播,使用 下面的来注册(不能在manifest中声明)来监听到变化,做出相应的变化IntentFilter filter = new IntentFilter(); filter.addAction(Intent.ACTION_BATTERY_CHANGED); registerReceiver(receiver, filter); 1 public class BatteryReceiverDemo extends Activity { 2 public static final String TAG = "B. 阅读全文
posted @ 2013-12-02 19:11 act262 阅读(341) 评论(0) 推荐(0) 编辑