On Sat, Sep 11, 2010 at 6:10 AM, Kostya Vasilyev <kmans...@gmail.com> wrote:
> It seems to me (and that's just my opinion) that
> onRetainNonConfigurationInstance / getLastNonConfigurationInstance is
> probably the easiest way for small, one-at-a-time async tasks, where UI
> feedback is supposed to be immediate.
>
> These two methods use plain Java objects, don't require serialization or
> parceling, so they are a good fit. The only issue is - switching UI
> references. OnRetail... can null them out before storing the task in a
> configuration object, and onStart / getLast... can store new UI references
> in the task.

Given Ms. Hackborn's explanation of the message flow, I would agree
with your assessment. Without that guarantee, though, I couldn't trust
this model.

> The task would also need to keep most recent progress state values, to be
> displayed in the newly created activity.

Actually, that shouldn't be needed. doInBackground() should be able to
just call publishProgress(). Those messages will just get queued up
until the new activity is ready.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
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

Reply via email to