2

Is there any way to differentiate the different trigger points of android application. For example, application can be triggered from notification bar/launcher icon/recent.

My app contains two tasks. Once user tap on launcher icon, only main task will be brought to foreground not the other. I want to differentiate the triggers points so that i can manage my different tasks accordingly.

Any kinda help will be highly appreciated!!

Daud Arfin
  • 2,499
  • 1
  • 18
  • 37
  • For notifications, since you create the PendingIntent yourself, you can add an "extra" in the intent which then you can get from your activity (getExtra) and determine whether or not it was called from the notification. I have no idea about the other ones though. – kha Oct 08 '14 at 07:41
  • exactly .. i am looking some thing similar for launcher too. – Daud Arfin Oct 08 '14 at 09:42
  • Wouldn't it be the case that "if extra flag exists: from notification else from launcher"? Are there other ways to launch an app in android? :). I can't think of any other way I've ever launched an app to be honest. – kha Oct 08 '14 at 10:05
  • 1
    other ways .. can bring from recent tasks/move task to foreground programmatically. – Daud Arfin Oct 08 '14 at 12:27

0 Answers0