Notification Pendingintent Extras Always Empty
Solution 1:
So I finally found the problem. After debugging several flag options and changing request codes. The request code here is irrelevant to the problem.
Responsible for the empty (not null) bundle is the flag ACTIVITY_NEW_TASK.
If I went with all other tested flags for the Intent or the PendingIntent everything works fine.
The android doc says following for ACTIVITY_NEW_TASK:
When using this flag, if a task is already running for the activity you are now starting, then a new activity will not be started; instead, the current task will simply be brought to the front of the screen with the state it was last in. See FLAG_ACTIVITY_MULTIPLE_TASK for a flag to disable this behavior.
This seems to indicate that the old Intent is still present and not the new one which I build in the receiver. Funny fact: even if I closed the app and then started the PendingIntent the bundle was empty. The doc as for my understanding would state it otherwise (activity not in a task? -> new task with new activity).
Post a Comment for "Notification Pendingintent Extras Always Empty"