I am creating app that download 4-5 images from server and display as gallery.
It working fine in normal condition. but when there is incoming call or device is in sleep mode my activity load data from starting after onResume, i am not able to load data(Resume activity) from previous state of activity.
Is there any soulution?
Thanks
You should read how to handle runtime changes.
Basically, under some situations your Activity will be recreated. To preserve state you can pass objects between old and new Activity, using
onSaveInstanceState()in old activity andonRestoreInstanceState()in new activity.