I have created some business objects which are created with the data from the database. I am doing this so that I don’t want to hit the DB again and again. The business objects implements parcelable interface. So I can put the arraylist of business objects to the next activity. I am using APILevel 8 so there is no point of using SharedPreferences.editor putExtraSet. Even if I am using API level 11 or above. PutExtraSet can have only set of Strings.
How can I make the arrayList or some collection of business objects available for the entire application rather than forwarding from one activity to another?
Thanks in advance for your help.
Extend the Application class.
The application class is global to your application and can be accessed by any activity by calling
or just keep a reference in you Activity if you use it a lot
In the androidManifest.xml the following has to be done.