I have to pass intent values to service class but every time intent take the same value as it took at very first time but i need every time different intent values.
Intent alarmIntent = new Intent(AppointmentActivity.this,
AlarmService.class);
alarmIntent.putExtra("appDate", appDateString);
alarmIntent.putExtra("appTime", appoint_time);
alarmIntent.putExtra("appDesc", appoint_desc);
alarmIntent.putExtra("appRemind", appoint_remind);
sender = PendingIntent.getService(AppointmentActivity.this, 0,
alarmIntent, 0);
AlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);
am.set(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), sender);
Replace the
PendingIntent.getServiceto:See if it works.
The Flag is important and
0might not be an allowed value.