Preventing main activity from being launched if running already
问题 I have an application that is launched via an intent-filter action. The problem is that every time the event/ action occurs, Android displays a dialog asking to launch the app even if it is already started. I want the behavior to be as follows: User asked to launch the app if app is not open. Dialog does not display if app is running in the foreground. Is there a way to achieve both of these goals? I am targeting Android 4.0. edit Here is my intent filter: <intent-filter> <action android:name