[android-developers] Re: How to create a Toast from a background operation?

2009-05-03 Thread Mariano Kamp
Sorry, I don't get it. Just to clarify, in your opinion an icon in the status bar (for the rest of the hour / or the user clicks on it) is less annoying than a toast? On Sun, May 3, 2009 at 12:42 AM, Raphael r...@android.com wrote: Being out of network on a cellphone is not slightly wrong,

[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Raphael
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

[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Mark Murphy
Mariano Kamp wrote: (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. Why not keep a log of failures and display it to the user when they

[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Mariano Kamp
Because having many options, logs and tweakable features are just good for developers, not for users. I think a toast an hour is not annoying (if something goes slightly wrong), but I understand that you might think otherwise. On Sun, May 3, 2009 at 12:08 AM, Mark Murphy

[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Raphael
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

[android-developers] Re: How to create a Toast from a background operation?

2009-05-02 Thread Raphael
Being out of network on a cellphone is not slightly wrong, it's something that happens very regularly. R/ On Sat, May 2, 2009 at 3:28 PM, Mariano Kamp mariano.k...@gmail.com wrote: Because having many options, logs and tweakable features are just good for developers, not for users. I think a

[android-developers] Re: How to create a Toast from a background operation?

2009-05-01 Thread Mark Murphy
Mariano Kamp wrote: 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? Does it matter? I have not tried to have a background thread use a Handler or runOnUiThread() of an Activity that might not be

[android-developers] Re: How to create a Toast from a background operation?

2009-05-01 Thread Mariano Kamp
Hey Mark, well, if just sending a toast from any thread I get this: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.init(Handler.java:121) at android.widget.Toast.init(Toast.java:397) at

[android-developers] Re: How to create a Toast from a background operation?

2009-05-01 Thread Mark Murphy
Mariano Kamp wrote: well, if just sending a toast from any thread I get this: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.init(Handler.java:121) at android.widget.Toast.init(Toast.java:397) at

[android-developers] Re: How to create a Toast from a background operation?

2009-05-01 Thread Mark Murphy
On Fri, May 1, 2009 at 8:07 PM, Mark Murphy mmur...@commonsware.com wrote: It looks like you are trying to manually instantiate a Handler, or possibly an Activity, in the background thread. If so, that is not the proper way to use a Handler. This is one of the reasons I dislike Handler,