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?

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.
  • rostamianiR Offline
    rostamianiR Offline
    rostamiani
    wrote on 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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

      rostamianiR 1 Reply Last reply
      1
      • rostamianiR Offline
        rostamianiR Offline
        rostamiani
        wrote on last edited by rostamiani
        #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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          • rostamianiR Offline
            rostamianiR Offline
            rostamiani
            wrote on 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
            • SGaistS SGaist

              Hi,

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

              rostamianiR Offline
              rostamianiR Offline
              rostamiani
              wrote on 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
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on 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

                rostamianiR 1 Reply Last reply
                1
                • SGaistS SGaist

                  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.

                  rostamianiR Offline
                  rostamianiR Offline
                  rostamiani
                  wrote on 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
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 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

                    • Login

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