I made a small app that downloads a file to the SD card and displays a
notification when the download is complete. When the user taps the
notification, I want to clear the notification and also switch to the
downloader application. I tried the following in my downloader's main
(and only) Activity:

@Override
protected void onResume() {
        super.onResume();

        notificationManager.cancel(R.string.app_name);
}

That works fine when I tap the notification from the home screen. If I
tap the notification from my Activity, however, onResume does not
appear to get called, and so the notification does not get cleared.

What is a good, general way to do this? I figure that this problem has
probably been solved several times.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to