Monday, September 20, 2010

[android-developers] Re: Android pattern for waiting on event

I'm just learning -- no particular task in mind -- but I'm thinking of
a case where, for the sake of argument, I'd put up three successive
dialogs, to gain pieces of information to be returned to the main
activity. I can see how you could do it by having the onClicked from
one dialog kick off the next bit of logic and so on, but that really
chops up the "main program" logic vs having it all in a single
sequence with "calls" out for the dialogs.

On Sep 20, 5:16 pm, TreKing <treking...@gmail.com> wrote:
> On Mon, Sep 20, 2010 at 4:52 PM, DanH <danhi...@ieee.org> wrote:
> > What is the Android technique/pattern for effectively waiting on an event
> > in another thread?  Eg, waiting for an onClicked in a dialog?
>
> In general, I'd say you really don't want to "wait" as much as you want to
> "respond".
> This will also vary based on what you're waiting on, how long you expect to
> wait, and how predictable the event you're waiting on is. For example, you'd
> probably do very different things waiting for the user to receive a text
> than you would waiting for server file to download.
>
> Perhaps more details on your exact use case are in order?
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment