I have an button in an activity, that calls an IntentService and shows a ProgressBar. After it is done downloading large files, it then creates a notification and broadcasts an intent with a String message stating "3 files downloaded." or "Unable to connect to server."
The activity registers a receiver in onResume and unregisters it in onPause. In the BroadcastReceiver's onReceive it displays a DialogFragment with a message from the intent. It also hides the notification and hides the ProgressBar. If the app is not in the foreground, and you click on the notification, it triggers the activity's onNewIntent. It then displays a DialogFragment with a message from the intent. It also hides the ProgressBar. If the app is not in the foreground however, and you use the App Switcher to return to the app, the notification does not clear and the DialogFragment never shows. The ProgressBar is also still visible. Is there a way within the Android framework to handle the last situation? I'm thinking of a hack by not actually bothering with the message in the intent, and storing it in SharedPreferences, but is there another way? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en