I send pending intentions as alarms, and I can receive different alarms when the application starts, so the state of the flag does not suit me.
I like it:
I send intentions with an identifier, for example, int.setAction ("MyIntent" + System.getCurrentTimeinMillis); keeping this key as a reference in BD or general privileges.
When you get the newIntent intent, you ask that bd or shared prefs is the .getAction () intent, and after that you clear the link.
source share