Reputation: 3
I am working with notifications for the first time, and it seems that i must be missing something obvious. I have an Android app that plays music. While it is playing, I have an ongoing notification displayed so I can easily get back to my app if it is in the background. My problem is that when I click the notification, it opens a whole new instance of the application, instead of resuming the previous instance.
I have a PendingIntent set up to launch my app, and a call to PendingIntent.getActivity(context, 0,myIntent, 0) I've tried different settings for the last parameter, but same results. What am I missing?
Mark D.
Upvotes: 0
Views: 471
Reputation: 1336
I currently use (in my countdown app):
android:launchMode="singleTask"
Upvotes: 0