For simplicity's sake I like Serializable because it frees you from the 
work of implementing Parcelable.  It's possible Parcleable could perform 
better, but if you're worried about performance when passing objects 
between activities then you should probably be storing them in a global 
location anyway.

One approach could be to have a global, synchronized Map<String, Object>.  
Each activity just adds an entry pair with a unique key, e.g. 
getClass().getCanonicalName() + "." + SystemClock.elapsedRealtime(), then 
passes the key to child activities.

One caveat:  when using that approach you need to be extremely careful to 
avoid leaking global storage.

On Friday, September 21, 2012 10:17:24 AM UTC-5, LemonCodes wrote:
>
> What is the best practices in passing Object? is it serializable or 
> parceable? kinda confused which one to use, i'm just planning passing a 
> single object not an array of Objects 
>

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