Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to get android & ios native contacts using Qt and show into QML?
Forum Updated to NodeBB v4.3 + New Features

How to get android & ios native contacts using Qt and show into QML?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
12 Posts 6 Posters 4.8k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dilip_Patel
    wrote on 2 Jun 2017, 18:25 last edited by
    #1

    We have tried following but we didn't get succeed for same.
    https://wiki.qt.io/Contacts_API

    Stackoverflow : 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.

    J 1 Reply Last reply 6 Jun 2017, 05:47
    0
    • D Dilip_Patel
      2 Jun 2017, 18:25

      We have tried following but we didn't get succeed for same.
      https://wiki.qt.io/Contacts_API

      Stackoverflow : 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.

      J Online
      J Online
      jsulm
      Lifetime Qt Champion
      wrote on 6 Jun 2017, 05:47 last edited by
      #2

      @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?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply 6 Jun 2017, 06:07
      1
      • J jsulm
        6 Jun 2017, 05:47

        @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?

        D Offline
        D Offline
        Dilip_Patel
        wrote on 6 Jun 2017, 06:07 last edited by
        #3

        @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.

        E 1 Reply Last reply 6 Jun 2017, 09:02
        0
        • D Dilip_Patel
          6 Jun 2017, 06:07

          @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.

          E Offline
          E Offline
          Eeli K
          wrote on 6 Jun 2017, 09:02 last edited by
          #4

          @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.

          D 1 Reply Last reply 8 Jun 2017, 06:31
          0
          • E Eeli K
            6 Jun 2017, 09:02

            @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.

            D Offline
            D Offline
            Dilip_Patel
            wrote on 8 Jun 2017, 06:31 last edited by
            #5

            @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 Qt

            I 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.

            J 1 Reply Last reply 8 Jun 2017, 07:57
            0
            • D Dilip_Patel
              8 Jun 2017, 06:31

              @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 Qt

              I 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.

              J Online
              J Online
              jsulm
              Lifetime Qt Champion
              wrote on 8 Jun 2017, 07:57 last edited by
              #6

              @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

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              E 1 Reply Last reply 8 Jun 2017, 08:28
              0
              • J jsulm
                8 Jun 2017, 07:57

                @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

                E Offline
                E Offline
                Eeli K
                wrote on 8 Jun 2017, 08:28 last edited by
                #7

                @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.

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  ibia
                  wrote on 8 Jun 2017, 09:16 last edited by
                  #8

                  Please look at this topic :
                  https://forum.qt.io/topic/33460/regarding-get-a-data-from-android-default-contacts-provider

                  It may help. Have also a look at QtAndroidExtras.

                  D 1 Reply Last reply 8 Jun 2017, 10:34
                  0
                  • I ibia
                    8 Jun 2017, 09:16

                    Please look at this topic :
                    https://forum.qt.io/topic/33460/regarding-get-a-data-from-android-default-contacts-provider

                    It may help. Have also a look at QtAndroidExtras.

                    D Offline
                    D Offline
                    Dilip_Patel
                    wrote on 8 Jun 2017, 10:34 last edited by
                    #9

                    Sorry @ibia , currently following link is not reachable on that post.
                    https://doc-snapshots.qt.io/qt5-stable/qandroidjniobject.html#details

                    For future information, Documentation link is changed.
                    http://doc.qt.io/qt-5/qandroidjniobject.html#details

                    1 Reply Last reply
                    0
                    • I Offline
                      I Offline
                      ibia
                      wrote on 8 Jun 2017, 11:47 last edited by
                      #10

                      Ok. Thanks you!

                      1 Reply Last reply
                      1
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 21 Jun 2017, 08:00 last edited by SGaist
                        #11

                        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.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        1
                        • F Offline
                          F Offline
                          feldifux
                          wrote on 12 Sept 2017, 12:59 last edited by
                          #12

                          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

                          Founder of Felgo SDK - http://felgo.com/qt

                          Felgo simplifies

                          • Mobile App Dev with Qt esp. iOS & Android
                          • Game Development with Qt

                          What others say

                          Felgo scored #1 in Cross-Platform App Development Tools Report - see why: https://goo.gl/rgp3rq

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved