On Aug 29, 10:28 pm, nloko <[email protected]> wrote:
> I've written an app that syncs social network photos with your phone's
> contact photos. It works great. However, I have an option that lets
> the user skip any contacts that already have a photo added. This works
> great until the phone (I assume) syncs up the photo from the social
> network with Google Contacts.
>
> I use a hash of the pic to track if the picture is one from my sync
> app or one that the user has added themselves. So, if Google Contacts
> changes the format of the pic, then the hash will change and my method
> is no good!
>
> How can I get around this? Ideas?

Perhaps, I should slow down a little and better explain...

1.) People.setPhotoData(.......) with arbitrary photo
2.) A few seconds / min later, the phone syncs the photo with Google
Contacts
3.) After the google sync, the photos on the phone change somehow.
Comparing the hash of the changed photo with the hash of the photo set
with People.setPhotoData differs.

Note, this doesn't happen on my emulator. I guess because I haven't
set up GoogleLoginService (I think it's broken on 1.5 SDK, anyway).
This scenario only happens on the phone.

I have a workaround where I run a service a min or two after issuing
my People.setPhotoData calls. The service looks at the new hashes and
updates the ones I am tracking. So, the next time I compare the hashes
I'm tracking with the hashes of the actual contact photos, I get a
match. I know it's not the greatest fix, and could easily break, but I
can't think of much else.

Thoughts?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to