How to create a SIP connection with Qt for Android?
-
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 -
Hi,
If you would like to use the native API, you can take a look at QtAndroidExtras to call Java code from Qt.
-
@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
-
Define slow
Clean code doesn't depend on the fact that you use JNI or pure C++
-
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 -
@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#manifestIs this true? Is this API untrustable?
-
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.
-
As it's written, it's not a SDK problem. EOM can implement it if they want that's their choice