I have two activities, say Activity A and Activity B.
Activity A is created when the application starts and then Activity B is being called from Activity A as follows:
Intent i = new Intent(A.this, B.class);
startActivity(i);
Activity B loads a Thread on its onCreate() and then when you click on Back, it will return to Activity A. This Thread is loading some images from a Database that is being updated within Activity B as well.
How can I save the state of Activity B so that I can avoid reloading the Thread that I have in Activity B when I call it again from Activity A.
Create a singleton class which loads the images and caches them. Every time you launch
Activity Bcheck this singleton class for images. If not loaded then load them otherwise read from the cache