Interesting. So, essentially, anything that cannot be passed in the
Intent could be passed via a local service. Is this a common tactic in
general?

What are the main advantages over just setting the objects as statics
on the secondary activity?

One, is the situation where the activity is killed and then restarted
by the system. I'm guessing that the local service approach would be
able to handle this better.

In my situation, the secondary activity is still very useful even if
the static cursor becomes null (I just disable a couple of buttons).

The main thing which puts me off the local service is the extra layer
and extra things that can go wrong. Extra care needed in stopping the
local service etc.

On May 9, 12:27 pm, Mark Murphy <[email protected]> wrote:
> westmeadboy wrote:
> > I really cannot think of any other way to do it, short of copying the
> > contents of the cursor into some other object.
>
> > Requerying the database is not an option because these are not simple
> > SQLiteCursor instances.
>
> > Please feel free to suggest alternatives!
>
> Have the data be managed by a local service. Have the activities bind to
> the local service. Have the activities request a cursor via methods on
> the local service when they need it. Pass truly transient data (e.g.,
> the position of the row the 2nd activity should look at) as Intent extras.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Consulting:http://commonsware.com/consulting
>
> --
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

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