On Jul 31, 1:41 am, Zsolt Vasvari <zvasv...@gmail.com> wrote:
> > But I am curious why you're serializing to JSON but not sending or
> > saving it anywhere, unless I'm misunderstood your previous message?
>
> I am storing JSON encoded objects in the Activity state in
> onSaveInstanceState().  It's used by Android to restore the state of
> the Activity if it was removed from memory for whatever reason.

Why wouldn't you just serialize the members of your object(s) directly
to the Bundle you're being given in onSaveInstanceState()?  It would
be much much faster and you'd retain all your data types.  You could
also put bundles within bundles in you need to handle nesting/
recursion.  And Bundles don't throw checked exceptions.  :-)

Doug

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