0

What I want: A dialog(activity with dialog Theme) with single choice list when user clicks a button on a notification.

What I don't want: To resume any activity that has been placed in "recents"

What happens now: When my application is closed (not in recents and not present) and I click my notification button, the dialog(activity) shows up as desired (and does not resume any recent activity), but when I have opened the app beforehand and it now resides in recents and is not present, the app gets brought to front (behind the dialog(activity)) which I don't want.

What should I do to make the application not resume my other activities when I create a dialogactivity from the notification?

btw, I have tried putting different flags on the PendingIntent in the notification but none that helped sadly...

1 Answers1

0

A Dialog is attached to a context (an activity here) you can't juste display it with nothing behind.

Damien Belard
  • 285
  • 3
  • 12
  • The pending intent I pass to the notification as action to the button starts the activity I want. The theme of that activity is `Theme.AppCompat.Dialog.Alert`. So I might have been unclear about what I meant. I corrected my question thanks. – Matti Torvaldsson Aug 11 '15 at 06:16