What you are describing is more or less the current workflow of the gmail & email app: - they download regularly your new mails in the background - you do NOT see any notification nor toast whether emails were retrieved or failed to or anything. - you just get a status when you go back to the application itself.
Think about it: - would I want to see a toast *each* time my cell is out of network? No. - would I want the device to spend time (and battery) displaying a toast when I'm not looking at it? No. The point (a) you described is exactly where you would not want to display a toast. Instead on that kind of app I'd like to see a small status icon or text that says: a/ failure to download, will retry in N minutes or b/ last time fetched N articles. R/ On Sat, May 2, 2009 at 3:00 PM, Mariano Kamp <mariano.k...@gmail.com> wrote: > I agree for the most part, but maybe I was to abstract to get to the details > where we possibly don't agree. > My app downloads regularly, say once an hour, new articles. > There are two noteworthy outcomes: > (a) There is a temporary network problem and a toast says that. The service > goes to sleep and an hour later it tries again. If the user didn't pay > attention to the problem and the toast then that's fine. > (b) The login fails, because the credentials are wrong. This is not > recoverable and needs attention. I use a notification to inform the user > about that. The notification leads the user to the login screen to correct > the problem. Another attempt at downloading new articles can only be > executed when the credentials are corrected. > > If I would use a notification for (a) this would be highly annoying for the > user; at least that is the way I think about it. > On Sat, May 2, 2009 at 11:38 PM, Raphael <r...@android.com> wrote: >> >> 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 <mariano.k...@gmail.com> >> 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 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 -~----------~----~----~----~------~----~------~--~---