Intent - if activity is running, bring it to front, else start a new one (from notification)
- 阅读更多 关于 Intent - if activity is running, bring it to front, else start a new one (from notification)
问题 My app has notifications, which - obviously - without any flags, start a new activity every time so I get multiple same activities running on top of each other, which is just wrong. What I want it to do is to bring the activity specified in the notifications pending intent, to the front if it is already running, otherwise start it. So far, the intent/pending intent for that notification I have is private static PendingIntent prepareIntent(Context context) { Intent intent = new Intent(context,