0

I made a chat application, it works fine, but I want to add a profile section, in this section the users can change their avatars (The avatar was a default picture) for any picture in gallery... at this point my app works well, the user can change avatar and it is show in the chat picture (like facebook).. but this is only local...

My question was:

What can I do to get all my contacts profile pictures?

EDITED

Hi I made a server and I connected my app to it, I'm able to upload pictures, when a user upload a picture my app rename the picture with an unique value, my new questions are...

What do I need to do to be able to see my contacts profile pictures? I need to download my contacts pictures to a temp folder? I'm lost here.

Jeff Davis
  • 4,736
  • 4
  • 38
  • 44
  • If you don't have a central server where everyone's profile data is stored you could try to send a special message to everyone with the image data. – haansn08 Aug 08 '14 at 22:39
  • ok, but how can I do that? could you give to me an example please? – Eilean Laborde Aug 08 '14 at 22:52
  • Well nobody knows anything how you send messages to different devices so it'll be hard for someone different to solve your problem. – haansn08 Aug 08 '14 at 22:55
  • Try these guys, we use them for all sorts of things that require a back end. It only costs money if your app really blows up and gets a ton of traffic, which means you can afford it. http://www.parse.com/ – Dave S Aug 08 '14 at 23:40

1 Answers1

0

Once you're able to request images from your server, you will have to download and display them. There are a variety of ways you can do this, the simplest using an AsyncTask to download in the background. See this StackOverflow question for a tutorial.

Another option is to use a third party library - I've had success with Universal Image Loader in several projects. It handles asynchronous downloading, caching and displaying of images. Once you've set it up, loading an image is simple:

imageLoader.displayImage("http://image-url.jpg", imageView);
Community
  • 1
  • 1
Aaron
  • 699
  • 4
  • 14