On Mon, Aug 8, 2011 at 12:18 PM, Dianne Hackborn <[email protected]> wrote:
> Doing this with an Activity isn't *too* hard:

Well, you also have to pass the IBinder object, since you can't get
that any other way. And, in the OP's case, you have to pass the
AsyncTask too, so it can be attached to the new activity instance. And
if you supplied some sort of listener interface to the service for
callbacks, you have to pass that as well, all via
onRetainNonConfigurationInstance().

None of these are intrinsically difficult, but trying to explain it to
newcomers to Android (e.g., students in a course) is not especially
pleasant.

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

Android 3.1 Programming Books: http://commonsware.com/books

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

Reply via email to