views:

94

answers:

2

I would like to make frequently changes for the contact's image on the iPhone. This app: Photo Phonebook, did it with facebook profile pictures.

In the app, there are automatics updates of contact's image:

Next time a Facebook friend calls, their Facebook photo appears on your iPhone. It also appears in the address book. When your friends change their profile photos on Facebook, they change on your iPhone as well.

Because there's no background processing for syncing contact images on the iPhone, I assume that they used some kind of a link or 'pointer' to the fb image.

Is it possible to put a link to image instead of the image itself? and every time the user access the same contact, the image is loaded from external link?

+2  A: 

Checkout this post on Asynch Image View. I have used this code and it works well.

AsyncImageView derives from UIView and asynchronously fetches the image at the configured URL.

Cannonade
I don't know c# so I can't really understand what's going on there.. I just need to know - is this feasible? Thanks
shaimagz
@shaimagz The example I linked to is in Objective-C not c# (I assume you are using Mono Touch?). Based on my understanding of your question, it is definitely feasible and AsynchImageView will do most of the work. If you are using Mono Touch, you will need a C# implementation of this class.
Cannonade
+2  A: 

I think that it is really possible. Our application did the same. We store the link to the Facebook photo. Whenever, user need to view the photo, we downloaded it. You can use asynchronous method like Cannoade's suggestion or just write some few multithreaded code yourself to do asynchronous. That's easy.

Another suggestion is that you should cache your image and when you need to get the new photo, check your image's link to see if the avatar has been changed. Facebook changes the user's avatar link whenever user changes the avatar so if you check the link, you can know if the cache is out of date not.

vodkhang