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

你。 提交于 2020-01-13 18:28:43

问题


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?


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/5801107/android-2-3-using-external-jain-sipj-sip-stack-classpath

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!