Why do this?
- Limitations of native sip stack.
- JAIN SIP is Java based
- A Complete SIP Stack
What is the issue using the existing JAIN SIP stack?
JAIN SIP uses package name javax which is also used by android's native sip stack implemented by google. So if JAIN SIP libraries are used in an android application, it causes a conflict and causes a runtime exception. <insert runtime exception when try to use JAIN SIP libraries>Using ANT to compile SIP library for android?
In order to solve the package name conflict, the ant script is modified to output the libraries which can be used in your android application. To compile android library from the package you are going to need ANT . After you have setup ant, test it in your command prompt with
c:\> ant -version
Apache Ant(TM) version 1.9.2 compiled on July 8 2013
If you see a similar output you are good to go ahead. Next step is to use the ant script below, change your directory to where you downloaded JAIN SIP Stack and run ant all.
c:\>ant all
if everything goes well, libraries for android will be placed at dist\android\android-sip-stack.jar.
c:\> ant -version
Apache Ant(TM) version 1.9.2 compiled on July 8 2013
If you see a similar output you are good to go ahead. Next step is to use the ant script below, change your directory to where you downloaded JAIN SIP Stack and run ant all.
c:\>ant all
if everything goes well, libraries for android will be placed at dist\android\android-sip-stack.jar.
How to use JAIN SIP in an android project?
In your android application use the jar created by the ant script and include as an external jar. In the next post we are going to see how to register a SIP client in an android application using the stack.
No comments:
Post a Comment