I have an activity which plays music and shows notification
PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, Intent.FLAG_ACTIVITY_NEW_TASK );
mBuilder.setContentIntent(pendingIntent);
mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
final int mId = 1;
mNotificationManager.notify(mId,mBuilder.build());
the problem is that as I go back from this activity lets say activity B, and I tap on the notification the activity restarts and now I have two streams of music playing, it seems as if the activity is duplicated
I had a look into the manifest to see if I can change something, and I added this line to my activity
android:launchMode="singleTop"
this didn't help either, any ideas? Thanks!