在BroadcastReceiver中能否监听系统时间?
就是想实现某个记录在某个时间能自动更新一次状态(有多条记录),于是想到用BroadcastReceiver来处理,但是怎么在这里监听系统的时间?
或者有没有其他办法替代这种方式。
[解决办法]
BroadcastReceiver mBroadcast =new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (action.equals(Intent.ACTION_TIME_TICK)) { mContext.sendBroadcast(new Intent(FRESH)); } } };
[解决办法]