>From a user point of view, I don't think trying to display a toast from a non-UI background task makes much sense. Would you like your usage of the phone to be interrupted by random toasts appearing for no apparent reason? Notifications are there for that purpose instead.
I'd suggest: - use toasts in response to immediate user interaction. - use notifications for information from background tasks. Using a notification, the user can just know that something happened and either ignore it, dismiss it or take care of it later. The user should have more details by looking at the notification area. As an added benefit clicking on the notification should bring one back to your app to get an update status view or something. R/ On Fri, May 1, 2009 at 10:40 AM, Mariano Kamp <[email protected]> wrote: > Hi, > what is a good way to signal an error from a thread that is not the UI > thread and you don't know which activity/handler is currently active? Can I > somehow get eleto the current UI thread? > Can I somehow use the MainLooper from the application context? > I use notification for serious events where the user needs to take action, > e.g. a login failed, but here I am looking for a transient notification with > a toast and it would be ok if the toast is not seen in some cases. > Cheers, > Mariano > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

