0

I have a broadcast receiver class that starts some dialog activity say A with the intent flag Intent.FLAG_ACTIVITY_NEW_TASK as i am starting activity from outside Activity(Even when my app is not running) and everyone do the same. **

case :

** i run my app and closed it.some event trigger broadcast and broadcast receiver will catch and start dialog activity A then user cancel it by finishing it.Here is the problem: user try to lunch app from home button then Dialog activity opens up instead of main activity.

any suggestion will be appreciated.

thanks in advance

Krishna Shrestha
  • 1,662
  • 14
  • 38

1 Answers1

0

You can check intent FLAG_ACTIVITY_CLEAR_TOP, FLAG_ACTIVITY_NO_HISTORY or FLAG_ACTIVITY_CLEAR_TASK.

iamtheexp01
  • 3,446
  • 9
  • 35
  • 35