Problem can be easily solved by storing the Byte array
of the Image in one of the Tags of SharedPreference
. To do this you need to convert the Image which is in a Bitmap
format to Byte Array. This array can be stored as a text (or Blob
) format in SharedPreference or SQLite
Database.
When, you need to display the image in any Activity, retrieve the Byte Array
and convert it to Bitmap
again. This Bitmap can be dynamically assigned to the ImageView
of the Activity.
Refer to this answer for the conversion code: How to convert Image into Byte Array in Android