I have a problem with the android alarmmanager. I’m setting the alarmmanager with two extra arguments, but only the first extra argument is available in the receiver-activity.
Intent intent = new Intent(con, AlarmReceiver.class);
Bundle extras = new Bundle();
extras.putInt("arg_1", 1);
extras.putInt("arg_2", 2);
intent.putExtras(extras);
PendingIntent sender = PendingIntent.getBroadcast(con,
1590, intent, PendingIntent.FLAG_UPDATE_CURRENT);
AlarmManager am = (AlarmManager) con
.getSystemService(Context.ALARM_SERVICE);
am.set(AlarmManager.RTC_WAKEUP, time, sender);
What’s wrong in my code? I’ve also changed the request code, so that no obsolete alarm can trigger my problems, but also just one extra argument is passed to my receiver activity.
Thanks 🙂
thanks for your help, i forgot to pass the 2nd extra argument from my receiver to my activity. such stupid error 😉