我正在设置闹钟,每天在设备中触发一次。警报触发正常,但需要一些数据才能正常工作。该数据以这种方式发送:
Namenode's metadata
然后,在AlarmReceiver中,在onReceive()中:
AlarmManager am=(AlarmManager)SplashActivity.this.getSystemService(Context.ALARM_SERVICE);
Intent msgIntent = new Intent(SplashActivity.this, AlarmReceiver.class);
msgIntent.putExtra("todaydate", today);
PendingIntent pIntent = PendingIntent.getBroadcast(this, ALARM_REQUEST_CODE, msgIntent, Intent.FILL_IN_DATA);
am.setRepeating(AlarmManager.RTC_WAKEUP, today, AlarmManager.INTERVAL_DAY, pIntent);
但是这会返回0.我做错了什么?
我想注意我已经在onReceive方法中设置了一个Log条目,并且可以访问它。