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 create a SIP connection with Qt for Android?
QtWS25 Last Chance

How to create a SIP connection with Qt for Android?

Scheduled Pinned Locked Moved Mobile and Embedded
voipsipandroidqt5
9 Posts 2 Posters 3.6k Views
  • 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.
  • R Offline
    R Offline
    rostamiani
    wrote on 7 Jun 2015, 07:17 last edited by
    #1

    I want to Connect to a SIP server for VIOP transaction using Qt for Android and I don't know how.
    Google has a SIP API but in Java. Is there any C++ API?
    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Jun 2015, 07:14 last edited by
      #2

      Hi,

      If you would like to use the native API, you can take a look at QtAndroidExtras to call Java code from Qt.

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

      R 1 Reply Last reply 13 Jun 2015, 08:01
      1
      • R Offline
        R Offline
        rostamiani
        wrote on 9 Jun 2015, 05:34 last edited by rostamiani 6 Sept 2015, 06:11
        #3

        @SGaist said:

        Hi,

        If you would like to use the native API, you can take a look at QtAndroidExtras to call Java code from Qt.

        Isn't it a little slow to call java from Qt?
        Witch is faster and with cleaner code?

        Thanks

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 9 Jun 2015, 21:51 last edited by
          #4

          Define slow

          Clean code doesn't depend on the fact that you use JNI or pure C++

          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
          0
          • R Offline
            R Offline
            rostamiani
            wrote on 11 Jun 2015, 05:06 last edited by
            #5

            Thanks, but I'm so confused now.
            I'm not familiar with native Java codes. I know C++ and just want to call Java methods.

            I found this tutorial :
            http://www.kdab.com/qt-android-episode-5/

            I added "QT += androidextras" to the .pro file. But don't know how to fall functions. In the example a user defined function is called but I want to call SIP functions.

            Example method:

            #include <QAndroidJniObject>
            int fibonacci(int n)
            {
                return QAndroidJniObject::callStaticMethod<jint>
                    ("com/kdab/training/MyJavaClass" // class name
                    , "fibonacci" // method name
                    , "(I)I" // signature
                    , n);
            }
            

            For example how can I call 'SipProfile? It's here:
            http://developer.android.com/reference/android/net/sip/SipProfile.html

            1 Reply Last reply
            0
            • S SGaist
              8 Jun 2015, 07:14

              Hi,

              If you would like to use the native API, you can take a look at QtAndroidExtras to call Java code from Qt.

              R Offline
              R Offline
              rostamiani
              wrote on 13 Jun 2015, 08:01 last edited by
              #6

              @SGaist Thanks. I found it so useful.
              I started learning SIP native API. But there is a problem: Do all Android 2.3+ phones support SIP API?
              This worries me:

              among devices running Android 2.3 (API level 9) or higher, not all devices will offer SIP support.
              http://developer.android.com/guide/topics/connectivity/sip.html#manifest

              Is this true? Is this API untrustable?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 13 Jun 2015, 22:31 last edited by
                #7

                It's not a problem of trustability, device manufacturer are not obliged to provide that feature. However, if you read the "Creating the Manifest" part, you'll see how to ensure that your application can only be installed on phone that provide the SIP API.

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

                R 1 Reply Last reply 14 Jun 2015, 05:13
                1
                • S SGaist
                  13 Jun 2015, 22:31

                  It's not a problem of trustability, device manufacturer are not obliged to provide that feature. However, if you read the "Creating the Manifest" part, you'll see how to ensure that your application can only be installed on phone that provide the SIP API.

                  R Offline
                  R Offline
                  rostamiani
                  wrote on 14 Jun 2015, 05:13 last edited by
                  #8

                  @SGaist
                  I want to write an app that support nearly all devices. Is this a Android SDK problem or it's app dependent?
                  Isnt it better to use a C++ SIP Stack?

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 18 Jun 2015, 22:33 last edited by
                    #9

                    As it's written, it's not a SDK problem. EOM can implement it if they want that's their choice

                    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
                    0

                    3/9

                    9 Jun 2015, 05:34

                    topic:navigator.unread, 6
                    • Login

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