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.9k 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.
  • jsulmJ jsulm

    @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 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
    0
    • D Dilip_Patel

      @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 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
      0
      • E Eeli K

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

        jsulmJ 1 Reply Last reply
        0
        • D Dilip_Patel

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

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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
          0
          • jsulmJ jsulm

            @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 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
            • ibiaI Offline
              ibiaI Offline
              ibia
              wrote on 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
              0
              • ibiaI ibia

                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 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
                • ibiaI Offline
                  ibiaI Offline
                  ibia
                  wrote on last edited by
                  #10

                  Ok. Thanks you!

                  1 Reply Last reply
                  1
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 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 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