D9690: Add first-cut contacts-reading plugin

Simon Redman noreply at phabricator.kde.org
Sun Jan 14 19:31:42 UTC 2018


sredman added a comment.


  In https://phabricator.kde.org/D9690#189003, @mtijink wrote:
  
  > Looks promising (didn't test it though), so I added a few initial comments. It's best if you think what //you// want to use it for. Otherwise you're implementing something which may never be used, or is unsuitable for an use case.
  
  
  Thanks for the feedback!
  
  For the in-line comments I didn't reply to, thank you for the good suggestions! I will implement them.

INLINE COMMENTS

> mtijink wrote in ContactsPlugin.java:106
> Two things: wouldn't it make more sense to keep the structure of the Android contacts (i.e. multiple numbers for one contact, so only send the name once)?
> 
> And the index is never used (and does not uniquely correspond to a single contact), so you don't need to send it.

I did it this way because I couldn't figure out how to use NetworkPackage to just send a pile of things and get them out on the other side, so I assign them unique (sequential) integers here, and the pull them out using the same scheme on the other side...

However, I just had a much better idea. One problem I haven't been able to solve is how to distinguish between two contacts with the same name, but Android has already solved this problem by having unique keys assigned to every contact. So my new thought is to ship the list of IDs, then have each contact in the package stored with that ID as the key. I will have a new version of this plugin up soon!

REPOSITORY
  R225 KDE Connect - Android application

REVISION DETAIL
  https://phabricator.kde.org/D9690

To: sredman, kdeconnect
Cc: mtijink
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20180114/b5a7e4b8/attachment.html>


More information about the KDEConnect mailing list