IntentFilter s_intentFilter;
s_intentFilter = new IntentFilter();
s_intentFilter.addAction(Intent.ACTION_TIME_TICK);
s_intentFilter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
s_intentFilter.addAction(Intent.ACTION_TIME_CHANGED);
activity.registerReceiver(broadcastReceiver, s_intentFilter);
Android监听时间变化的广播,只能动态注册
最新推荐文章于 2022-12-26 10:03:32 发布