Skip to main content

Posts

Showing posts from April, 2017

How To Send Array Of Objects To Activity - Android Parcelable

Creating parcelable object is the solution to send an array of objects to activity. Many times we required to send important data and information from one activity to another activity, we use the Android Intent and bind the integer, long, String etc in the extra parameter of the intent for this purpose.  But, what if we have to send the array of objects to any activity?  So, here we are going to learn about Android Parcelable objects which can be used to send and receive the array of objects to any activity. Parcelable  Class to create and Send Array Of Objects To Activity In this section, we will create a class which implements parcelable, so that we can use this object class to create and sends an array of objects to Activity as a parcel to the second activity. The class which implements the parcelable interface should also have a non-null static field called of CREATOR a type that implements the Parceable.Creator  interface. A typical implementation of Parcelable Interface is as gi