Unsolved How to get android & ios native contacts using Qt and show into QML?
-
@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. -
@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.
-
@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 -
@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.
-
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.
-
Sorry @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 -
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.
-
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