Android 2.3 using external JAIN-SIP(J-SIP) Stack |

2019-05-11 20:18发布

I'm trying to use the JAIN-SIP (J-SIP) library on Android 2.3.3. (http://jsip.java.net/) Therefore I utilized a very basic SIP-example app that comes with the SIP-Stack. This example runs perfectly on Android devices <= Android 2.2.

The problem ist, that Android 2.3.3 brings a SIP-Strack with it's system-libraries, which is a slightly modified version of the JAIN-SIP stack. So on Android 2.3.3 devices, the internal SIP-Stack is loaded (because of same package/library names) instead of the JAIN-SIP that comes with the APK and the application crashes with "function not found" exceptions (due to the fact that some functions don't exist in this internal Android 2.3.3 SIP-Stack).

What I wan't to know is, how I can "priorize" my JAIN-SIP stack that comes with the APK and ignore the Android system SIP-Stack.

One Solution is using the internal SIP-Stack directyl, which is strongly discouraged, because no one knows if it's not further modified with the next Android releases.

The other solution that came to my mind is changing the package names of "my" JAIN-SIP stack that it is not mixed up with the internal SIP-stack.

The uses-library declaration in the manifest.xml does not work, because it's only for internal SDK-libs / SDK-Addons.

Any more ideas?

标签: android sip
2条回答
啃猪蹄的小仙女
2楼-- · 2019-05-11 21:02

We are considering shipping jars which would allow to embed the JSIP Stack into any Android devices by renaming all the javax classes with a post convert tool and publish the jar along with the regular jsip jars. See https://groups.google.com/d/topic/mobicents-public/UD7ZTX74Yrk/discussion

Jean

查看更多
三岁会撩人
3楼-- · 2019-05-11 21:13

I applied my proposed solution and renamed the packages of the JSIP-stack, via the Eclipse Refactoring function and got the JSIp stack working on Android 2.3.3 Emulator and device. There are package-path strings in the samples and in the class "SipStackImpl.java" which should get renamed (find/replace) by hand to new new package paths.

I tested it with the shootist and shootme samples from the JSIP stack.

It also ran on Android 2.2 in the Emulator.

If someone could come up with a better solution, I would apreciated it.

查看更多
登录 后发表回答