Hi,
thanks for the hin, I have now changed the launchmode of my activity
to "singleTop":
and changed the code to look like this:
// The PendingIntent to launch our activity if the user selects this
// notification
final Intent notificationIntent = new Intent(ManagerFactory
.getMasterActivity(), MailerActivity.class);
notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
Log.d(TAG, "Set new message to Notification: " + p_message);
notificationIntent
.putExtra(Constants.NOTIFICATION_EXTRA_KEY, p_message);
Log.d(TAG, "Setting requestCodeToFixNotificationBug: "
+ s_requestCodeToFixNotificationBug);
final PendingIntent contentIntent = PendingIntent.getActivity(
ManagerFactory.s_service, s_requestCodeToFixNotificationBug++,
notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
notification.setLatestEventInfo(ManagerFactory.s_service,
p_tickerText,
p_message, contentIntent);
return notification;
Still the same issue! So it did not change anything. :( The app is
running in the background... what the heck is going on here? :(
And @RNekic was right... if the app is not active (running in the
background), it does not call onNewIntent() but onCreate(). How could
I tell my code to use the old instance instead of creating a new one?
Sascha
On Jan 18, 9:15 pm, reyden <[email protected]> wrote:
> I've had a similar issue with one of my activities that was supposed
> to be launched via notifications. After some digging I've solved it by
> declaring "singleTop" launch mode for the activity in manifest and by
> using FLAG_ACTIVITY_CLEAR_TOP flag on the pending intent for
> notification manager...
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en