signalapp / Flock

Private contact and calendar sync for Android.
https://signal.org/blog/flock
358 stars 80 forks source link

Contact Pictures #28

Closed Deccoy closed 10 years ago

Deccoy commented 10 years ago

Please sync the contact pictures, too.

rhodey commented 10 years ago

Flock should support syncing of contacts pictures, if this is not working then it is likely a bug with the Flock android client or confusion caused by the contact app you are using.

All contacts on Android have to be associated with an "account" on the android device, this is really just a user name that has to be in the form of an email address. For example, contacts from your gmail are associated with your google account and Flock contacts are associated with your Flock account. If you open the Android "People" app you can see a list of all your accounts by tapping the options button and then "Contacts to display".

It starts to get confusing when you have one contact associated with two accounts. Imagine that you had a contact "Rhodey Orbits - 1-555-555-5555" in your gmail account and when setting up Flock you decided to import all contacts from this account. If you were to go to "Rhodey Orbits" in the People app, tap the edit icon, and scroll down, you would see that there are two separate listings for "Rhodey Orbits", one for each account. Only the edits to the contact associated with your Flock account will be synced by Flock, this goes for adding and editing photos as well.

It is also possible that this was the fault of our Flock Sync servers. For a very short period after we released Flock, the Flock Sync servers were incorrectly configured and as a result had trouble syncing contacts which had pictures. This server bug has been fixed since and we're making sure it doesn't happen again in the future. Sorry for any problems you experienced because of this server bug, please continue to submit bug reports here and we will address as soon as possible.

Let me know if anything in this post resolves your issue so that I can know to keep this issue open or close, thanks!

ghost commented 10 years ago

rhodey, I may not be getting all the implications here. But I as well can not get the pics to import. This is similar to the experience I had with multi-line addresses (which you fixed thanks very much!). If on one device I set up a new flock account and import the google contacts, then limit the account to display in people to just flock, the pics all seem to be there. But if I then go to another device with no account contacts set up all and set up flock with the same flock account and import, all the contacts come in great. But no pictures come with them. Is it possible the imported pics don't make it off the first device into flock "storage"?

rhodey commented 10 years ago

I am unable to reproduce this issue, this leads me to believe that Android has a way of storing contact photos that I have not encountered before. To help with the debugging could one of you try the following...?

  1. install Flock.
  2. register a new account.
  3. do not import any contacts.
  4. settings >> Flock >> tap username@flock >> un-check "Contacts".
  5. import contacts from an account that has contact pictures.
  6. go to your contacts app and edit a contact that has a picture...

At this point you should see two copies of the contact info, one from the account you imported (Google for example) and one from your new Flock account. For me, both copies of the information have the contact picture, but judging from your bug reports I would guess that for you only the original contact has the picture. Is this true?

Can you confirm that this issue happened when importing contacts from a Google account? Did all contact photos fail to be synced over to the new phone? Are these contact photos somehow synced in from Google Plus (no known issues, just a guess :P)?

ghost commented 10 years ago

I can test this this evening ET. I'll see if I can figure out source for my google contact pics. I know some get picked up from the contact's google plus account, and some I added to the contacts manually if they did not have a google profile pic.

rhodey commented 10 years ago

Thanks @eleavings ! I'll be researching other possible contact photo locations in the meantime.

Deccoy commented 10 years ago

@rhodey: I tried your steps on my Nexus 5, Stock Rom: I see one contact including the Information from both accounts.

First I see the android contact details, if I scroll down, I see the flock details from the same contact - without the picture. All picture are added manually and are also visible on the Google Mail Web Interface.

screenshot_2014-07-30-19-11-24 screenshot_2014-07-30-19-11-28

rhodey commented 10 years ago

Thanks @Deccoy this helps a lot. This is definitely a bug in Flock, I've got a few ideas to try out.

rhodey commented 10 years ago

For anyone able to reproduce this bug could I get the following information for help with debugging:

  1. Android version.
  2. Android device model.
  3. Name of contact app or apps used to manage contacts.
  4. Flock version.
ghost commented 10 years ago

Android Ver = Android 4.4.4 (CM11 Nightly) Device = Galaxy Note 3 (SM-N900T) Contact App = Default (People) Flock Ver = 0.70

rhodey commented 10 years ago

I believe that I resolved this issue in commit a9a3e905b7cec91b27ae4743fc9c42f20489fc4b of branch "issue-28" >> https://github.com/WhisperSystems/Flock/tree/issue-28

Unfortunately I am still not able to reproduce this issue with any of the contacts on my Android devices. Is there anyone able to reproduce this issue and willing to build branch "issue-28" and test? Alternatively I could build an APK of the branch, sign with my signing keys and make the APK available to anyone willing to run tests.

The issue (or at least part of the issue) is that Flock was only programmed to work with the contact "display photo". This display photo is the default place that you will find contact photos, but if nothing is there you should also check for the "thumbnail photo". The issue-28 branch includes patches to read from both the display and thumbnail photo with preference to the display photo because it is always expected to be higher resolution.

If I could find a way to add thumbnail photos to my contacts I could test this myself, any tips or takers on the test APK build?

ghost commented 10 years ago

@rhodey yes I am testing "issue-28" branch now.

rhodey commented 10 years ago

Thanks @eleavings. The branch doesn't yet include the useful "clear all contacts feature" as discussed in #30, just started work on that now.

ghost commented 10 years ago

@rhodey, booya! Success with this build (issue-28). All pics, both default google plus profile pics if the contact was in google plus, and pics added by me if the contact had no profile pic or was not in google plus, sync'd into flock successfully.

Steps assuming no Flock installed:

  1. turn off all contact syncing for all accounts.
  2. clear data/cache for contact storage and contact apps
  3. turn on sync for one google account and let contacts complete syncing
  4. install flock build issue-28 .apk
  5. create new flock account and sync contacts for chosen google account
  6. wait till sync completes entirely (be patient).
  7. use default people app and check contacts with pics. open a contact, edit, and check the pic for both google and flock. should be the same.
  8. change contacts to display to only flock and check pics again

And just to be extra thorough....

  1. turn off contact sync on all accounts including flock
  2. clear flock data and cache and uninstall.
  3. clear contact storage and contact data and cache.
  4. verify no contacts on device
  5. re-install Flock build issue-28 .apk
  6. connect to new account created in step 5 above.
  7. wait for complete sync and use people app to verify all contacts that should have pics do in fact have them.
rhodey commented 10 years ago

@eleavings woot! thanks for helping out and getting back to me with such thorough test results :) will merge issue-28 into master in a few minutes. Before the day is over I want to resolve #30 and take a shot at #35, then you can expect this to be in a release to the app store later tonight.

ghost commented 10 years ago

Awesome. Looking forward to the next official build. Your work is much appreciated.

rhodey commented 10 years ago

resolved in a9a3e905b7cec91b27ae4743fc9c42f20489fc4b, closing