0

If I setup a notification to start an activity, then if the user is using this exact activity when taping the notification nothing happens, is there anyway the code can be notified when this happen? My activity launch mode is normal and no flags nor any special configuration exists.

Edit:

The notification does work and when the user is viewing activity other than the one associated with the notification, the activity is opened as expected, my question is that when the user is viewing the same activity that should open on notification tap, then when he pulls down the notification drawer and tap the notification nothing happens.

ammcom
  • 992
  • 1
  • 7
  • 24
  • Maybe this will help: http://stackoverflow.com/q/12043671/6272369 – Marat Oct 12 '16 at 18:38
  • No this talks about a different issue – ammcom Oct 12 '16 at 18:55
  • `when taping the notification nothing happens, is there anyway the code can be notified when this happen? `. Very strange question. So your code does not work. And now you want to be notificated that it does not work? Notifying the code or the user? – greenapps Oct 12 '16 at 19:44

1 Answers1

0

I have come to a solution to this:

I set the launchMode of my activity to singleTop this way when the notification is clicked onNewIntent is called, my activity is guaranteed not to stay in stack so singleTop has no side effect

ammcom
  • 992
  • 1
  • 7
  • 24