I am setting an alarm on a button click.
The alarm is triggered with an intent.
This intent get an extra "int" to pass to the Broadcast Receiver.
The problem is that the intent's extra gets set once on the first click of the button and never changes on the other clicks:
Intent intent = new Intent(A.this, B.class);
intent.putExtra(WAKEUP_DURATION, wakeUpDuration);
PendingIntent sender = PendingIntent.getBroadcast(A.this, 0, intent, 0);
I tried removing it in the Broadcast Receiver, but no luck:
intent.removeExtra(A.WAKEUP_DURATION);