How to correctly insert contacts ?
Hi all.
I'm making a Qt application which allow to modify / create contacts from a computer. I managed to do this by directly inserting datas inside the privileged database in all tables (this one : /home/nemo/.local/share/privileged/Contacts/qtcontacts-sqlite/contacts.db). However doing this brought me two drawbacks :
- It require to change the owner of the privileged folder to nemo
- Even if the backend is well made only the first Name and the last Name is displayed on the contact graphic interface of the phone (every else informations such as phoneNumbers or nicknames are not displayed even if they exists in the database)
After some searching i found out every contacts requires a key inside the Guids tables, so... i'm stuck by doing this way, even after searches on this forum.
I found two alternate way :
Sending a signal on the Dbus to create a contact from the phone, but i don't know which method do this job and i didnt find the interface which handle contacts (org.nemomobile.contacts.sqlite is not found in the DBus inspector)
using the qcontactmanager / qcontact : but i don't know how to use it and how to import it (in fact i don't find documentation about it)
What's the best option ?
Thanks for answers or idea
EDIT : i think i explained badly my problem, i can create contacts but only a few informations are displayed on the contact screen.
Example :
Created on the phone
Created from the Qt Application
Both got phone numbers and emails on the database, however only the one created from the phone (as any user) display these informations
@MichautS - maybe this might help you;
dbus service for contacts = com.jolla.contacts.ui;
Full path for ContactsDBusService,qml;
Spam Hunter ( 2017-11-30 13:17:45 +0300 )edit