I have a fragmentActivity
with many fragments. My activity (show just one fragment in first) launches an alarm with a pending intent like this :
AlarmManager am = (AlarmManager) context
.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context,MainFragmentActivity.class);
intent.putExtra(MainFragmentActivity.IS_LOCKSCREEN, true);
PendingIntent pendingintent = PendingIntent.getActivity(context,ALARM_ID, intent, PendingIntent.FLAG_CANCEL_CURRENT);
am.cancel(pendingintent);
date = wakUp.getTime();
am.set(AlarmManager.RTC_WAKEUP, wakUp.getTimeInMillis(),
pendingintent);
And I finish the activity before the alarm rings.
My alarm rings, my activty is launched and shows a specific fragment (background red) because the extra MainFragmentActivity.IS_LOCKSCREEN
is true .
I finish the activity and I run the application with recent app, the extra is always set to true, so the red fragment is launched. I don't understand, my extra should be set to false.
Thank you !