<table><tr><td style="">sredman retitled this revision from "Add contacts-reading plugin" to "Add contacts-reading plugin (KDE side)".<br />sredman edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-b2tlfhyinh4wwmw/">(Show Details)</a><br />sredman edited the test plan for this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-jvh277bujceqsxk/">(Show Details)</a><br />sredman added a subscriber: KDE Connect.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D9691">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;">Add a plugin to KDE Connect which supports <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">reading</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">exporting</span> the Android contacts databases <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">and exporting that data over DBus<br />
 - Currently supports getting contact names, email addresses, and phone numbers<br />
 - All contacts are associated with a unique ID<br />
 - After getting a valid uID</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">to vcards on the desktop<br />
<br />
When the devices are connected</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">more information about that contact can be requested by sending that uID as part of an argument to the DBus methods<br />
 - Phone number and email address entries are stored as a triple of the phone number or email address</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">the plugin sends a request for all timestamps and IDs<br />
<br />
When a packet with timestamps and IDs is received</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">an integer representing the type,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">it verifies it has vcards for each ID and that the timestamps match and deletes any vcards for IDs which were not reported.</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">and a label, if defined<br />
</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">It then sends a request for all vcards which were missing or need updating<br />
<br />
When a packet with vcards is received they are unconditionally written to disk,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- Phone number and email address types are currently not defined, but happen to match the types defined by Android's contacts database</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">possibly overwriting existing vcards<br />
<br />
Provides one dbus method: contacts/synchronizeRemoteWithLocal which triggers the request for all timestamps and ID</span>s<div style="padding: 8px 0;">...</div></div></div></div><br /><div><strong>CHANGES TO TEST PLAN</strong><div><div style="white-space: pre-wrap; color: #74777D;"><span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">Use some DBus debugger, such as d-feet or QDBusViewer to push and poke the DBus interfaces:<br />
 - Start by calling getAllContactUIDs,</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">Connect the device to the desktop and verify that vcards are created in QStandardPaths::GenericDataLocation / kpeoplevcard".</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">which returns a list of all valid uIDs<br />
 - Take some or all of those uIDs and call getNamesByUIDs to see who in your contacts book is being represented<br />
</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">On my system this is ~/.local/share/kpeoplevcard<br />
<br />
Create a dummy contact on the device and verify it is synchronized (Currently not automatic,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- Take some or all of those uIDs and call getPhonesByUIDs or getEmailsByUIDs, and verify that the data coming back is the correct data as you have entered it in your contacts database<br />
</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">have to disconnect and reconnect or use dbus)<br />
<br />
Modify the dummy contact and verify the modifications are synchronized (Currently not automatic,</span> <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">- Make up some uID and enter it into getNamesByUIDs, getPhonesByUIDs</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">have to disconnect and reconnect or use dbus)<br />
<br />
Delete the dummy contact and verify the deletion is synchronized (Currently not automatic</span>, <span style="padding: 0 2px; color: #333333; background: rgba(251, 175, 175, .7);">and getEmailsByUIDs to verify the plugin is able to handle 'bad' data</span><span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);">have to disconnect and reconnect or use dbus)</span></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R224 KDE Connect</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9691">https://phabricator.kde.org/D9691</a></div></div><br /><div><strong>To: </strong>sredman, KDE Connect, apol<br /><strong>Cc: </strong>KDE Connect, apol, adeen-s, SemperPeritus, ahmedbesbes, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, menasshock, ach<br /></div>