I create an application which displays the notification when the
service starts.  If an user navigates to HOME screen (without exiting
the application), the user could still go back to the previous
application by pressing on the notification icon. This is very similar
case as the track recording service in Google application "My Track".

I want the existing activity as Single Top activity since it has
associated service running.  However when my application tries to
bring the existing activity to front via notification, the existing
activity's onDestroy has been called which causes problem. How can I
skip this onDestroy method?  Here is my current codes:

Intent toLaunch = new Intent(getApplicationContext(),
myRunningActivity.class);

PendingIntent intentBack =
PendingIntent.getActivity(getApplicationContext(), 0, toLaunch,
PendingIntent.FLAG_UPDATE_CURRENT);

notification.setLatestEventInfo(getApplicationContext(),
getText(R.string.GPS_service_name), text, intentBack);

myNotificationManaager.notify(notify_id, notification);


Thanks,

-Eric

-- 
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

Reply via email to