How to get android & ios native contacts using Qt and show into QML?
-
wrote on 2 Jun 2017, 18:25 last edited by
We have tried following but we didn't get succeed for same.
https://wiki.qt.io/Contacts_APIStackoverflow : https://stackoverflow.com/questions/3255377/how-to-obtain-contact-list-in-qt
seems me to very old,
Request you to guide me for proper documentation where cross platform android and ios contact synchronization. -
We have tried following but we didn't get succeed for same.
https://wiki.qt.io/Contacts_APIStackoverflow : https://stackoverflow.com/questions/3255377/how-to-obtain-contact-list-in-qt
seems me to very old,
Request you to guide me for proper documentation where cross platform android and ios contact synchronization.@Dilip_Patel You should first say what exactly did not work. Any error messages?
As far as I know an app must have access rights to access contacts. If you install an app which wants to access contacts the system asks you to allow it. Does you app specify that it needs to access contacts? -
@Dilip_Patel You should first say what exactly did not work. Any error messages?
As far as I know an app must have access rights to access contacts. If you install an app which wants to access contacts the system asks you to allow it. Does you app specify that it needs to access contacts?wrote on 6 Jun 2017, 06:07 last edited by@jsulm Actually i am not getting exact document to get contacts from android and ios "device".
I found link reference of stack overflow, there it has replied "it is not possible".
But still i didn't find any such sentence from QT.
So i need example documentation for exact implementation.
Thanks in advance. -
@jsulm Actually i am not getting exact document to get contacts from android and ios "device".
I found link reference of stack overflow, there it has replied "it is not possible".
But still i didn't find any such sentence from QT.
So i need example documentation for exact implementation.
Thanks in advance.wrote on 6 Jun 2017, 09:02 last edited by@Dilip_Patel I don't know the details, but it looks like this Contacts API was in Qt labs, maybe never released as a stable API, and may have been implemented only on certain platforms (probably for Nokia Symbian phones).
You probably have to use each system's native contacts list, in Android it would be done using the java API.
-
@Dilip_Patel I don't know the details, but it looks like this Contacts API was in Qt labs, maybe never released as a stable API, and may have been implemented only on certain platforms (probably for Nokia Symbian phones).
You probably have to use each system's native contacts list, in Android it would be done using the java API.
wrote on 8 Jun 2017, 06:31 last edited by@Eeli-K You are right. :)
I have tried to put first line in my c++ code ,, "#include<QContactManager>" and i didn't find 'QContactManager' class it self in QtI need cross platform solution for device contact synchronization.
But it is not there in examples, no clue, so i guess only option go with native code binding.
Yes it is dangerous but no option. -
@Eeli-K You are right. :)
I have tried to put first line in my c++ code ,, "#include<QContactManager>" and i didn't find 'QContactManager' class it self in QtI need cross platform solution for device contact synchronization.
But it is not there in examples, no clue, so i guess only option go with native code binding.
Yes it is dangerous but no option.@Dilip_Patel said in How to get android & ios native contacts using Qt and show into QML?:
QContactManager
This class is part of Qt Mobility which should be an Qt add-on since Qt 5.
See https://wiki.qt.io/Category:Developing_with_Qt::QtMobility -
@Dilip_Patel said in How to get android & ios native contacts using Qt and show into QML?:
QContactManager
This class is part of Qt Mobility which should be an Qt add-on since Qt 5.
See https://wiki.qt.io/Category:Developing_with_Qt::QtMobilitywrote on 8 Jun 2017, 08:28 last edited by@jsulm This page talks only about Nokia Ovi store (which doesn't exist anymore) and the last date mentioned is 2011. The link to a release is dead. Do you have up to date information and link? I didn't find any, that's why I said what I said.
-
wrote on 8 Jun 2017, 09:16 last edited by
Please look at this topic :
https://forum.qt.io/topic/33460/regarding-get-a-data-from-android-default-contacts-providerIt may help. Have also a look at QtAndroidExtras.
-
Please look at this topic :
https://forum.qt.io/topic/33460/regarding-get-a-data-from-android-default-contacts-providerIt may help. Have also a look at QtAndroidExtras.
wrote on 8 Jun 2017, 10:34 last edited bySorry @ibia , currently following link is not reachable on that post.
https://doc-snapshots.qt.io/qt5-stable/qandroidjniobject.html#detailsFor future information, Documentation link is changed.
http://doc.qt.io/qt-5/qandroidjniobject.html#details -
wrote on 8 Jun 2017, 11:47 last edited by
Ok. Thanks you!
-
Hi,
Something to take a look at: https://cgit.kde.org/android-qt-mobility.git/
The repository itself is pretty old but it should give a starting point.
-
wrote on 12 Sept 2017, 12:59 last edited by
Hi,
you can use the new V-Play API for getting iOS & Android contacts for iOS & Android with a single method call of nativeUtils.getContacts().It works like this:
import VPlayApps 1.0 App { AppListView { anchors.fill: parent model: nativeUtils.getContacts() delegate: SimpleRow { text: modelData.name detailText: modelData.phoneNumber } } }
You can find more infos about this new feature here.
Cheers, Chris