How to handle images better in Android
Posted
by primal
on Stack Overflow
See other posts from Stack Overflow
or by primal
Published on 2010-05-29T06:01:08Z
Indexed on
2010/05/29
6:02 UTC
Read the original article
Hit count: 266
In the microblogging application I am developing I wish to show an user image beside each post in the timeline. The images are small in size(max 50*50 dip) and are not more than 10 in number. I've two approaches in my mind.
1) Allow user to chose an image from Gallery on signing up. Send the image to the server and on subsequent signups load the image from the server. I'm worried whether this approach is doing too much unnecessary work.
2) The same method is same as above in first step but this time the image is not send to the server but a key value associated with the image is sent to the server. On subsequent signups, after obtaining the key from the server the specific image is loaded from gallery.
I am not sure whether the second approach is possible. Any corrections on this aspect would be much appreciated.
Also, Is it possible to store an image in SharedPreferences?
Any new approach to handle this problem better are welcome.
© Stack Overflow or respective owner