Changes between Version 18 and Version 19 of Getting-Started/Android


Ignore:
Timestamp:
Apr 29, 2013 9:50:48 AM (12 years ago)
Author:
riza
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Getting-Started/Android

    v18 v19  
    99 
    1010 * Besides the [http://developer.android.com/sdk/index.html Android SDK], you will also need the [http://developer.android.com/tools/sdk/ndk/index.html Android NDK]. 
    11  * Optional: [http://www.swig.org/download.html SWIG] if you want to build the sample application apjsua. 
     11 * Optional: [http://www.swig.org/download.html SWIG] if you want to build the sample application pjsua. 
    1212 
    1313== Build Preparation == 
    1414 
    15  1. [wiki:Getting-Started/Download-Source Get the source code], if you haven't already. 
     15 1. [wiki:Getting-Started/Download-Source Get the source code], if you haven't already. This tutorial applies to PJSIP version 2.2 and above (or the 2.1 from SVN trunk dated 2013/04/24 or later). 
    1616 2. Set your [wiki:Getting-Started/Build-Preparation config_site.h] to the following: 
    1717  {{{ 
     
    3737 * other customizations are similar to what is explained in [wiki:Getting-Started/Autoconf Building with GNU] page. 
    3838 
    39 == Building and running apjsua sample application == #apjsua 
     39== Building and running pjsua sample application == #pjsua 
    4040 
    41 We have apjsua sample application located under {{{pjsip-apps/src/apjsua}}}. It is not built by default, and you need [http://www.swig.org/download.html SWIG] to build it. 
     41We have pjsua sample application located under {{{pjsip-apps/src/pjsua/android}}}. It is not built by default, and you need [http://www.swig.org/download.html SWIG] to build it. 
    4242 
    43 Follow these steps to build apjsua: 
     43Follow these steps to build pjsua: 
    4444 1. Make sure SWIG is in the build environment PATH. 
    45      - Alternatively, update SWIG path in {{{$PJDIR/pjsip-apps/src/apjsua/jni/Android.mk}}} file. 
    46  1. Run {{{ndk-build}}} from directory {{{$PJDIR/pjsip-apps/src/apjsua}}}, note that the Android NDK root should be in the PATH, e.g: 
     45     - Alternatively, update SWIG path in {{{$PJDIR/pjsip-apps/src/pjsua/android/jni/Android.mk}}} file. 
     46 1. Run {{{ndk-build}}} from directory {{{$PJDIR/pjsip-apps/src/pjsua/android}}}, note that the Android NDK root should be in the PATH, e.g: 
    4747     {{{ 
    4848$ cd /path/to/your/pjsip/dir 
    49 $ cd pjsip-apps/src/apjsua 
     49$ cd pjsip-apps/src/pjsua/android 
    5050$ ndk-build 
    5151     }}} 
    52  1. Create Android project from apjsua. In Eclipse: 
     52 1. Create Android project from pjsua. In Eclipse: 
    5353    a. From menu: '''File''' --> '''New''' --> '''Project''' 
    5454    a. Select '''Android Project from Existing Code''', press '''Next''' 
    55     a. In ''Root Directory'', put the location of '''apjsua''' source code (i.e. {{{$PJDIR/pjsip-apps/src/apjsua}}}) and press '''Finish''' 
    56  1. You may need to select different Android SDK than what is configured in apjsua. You can do this from the project's '''Properties'''. 
    57  1. You can modify {{{apjsua/res/raw/config.txt}}} for apjsua's config file. 
     55    a. In ''Root Directory'', put the location of '''pjsua''' source code (i.e. {{{$PJDIR/pjsip-apps/src/pjsua/android}}}) and press '''Finish''' 
     56 1. You may need to select different Android SDK than what is configured in pjsua. You can do this from the project's '''Properties'''. 
    5857 1. Run it. 
     58 1. You will see telnet instructions on the device's screen. Telnet to this address to operate the application. 
    5959 
    6060 
     
    6363Here are the steps for debugging PJSIP native code using Eclipse: 
    6464 1. Build PJSIP with debugging enabled, e.g: insert {{{CFLAGS += -g}}} into {{{user.mak}}} in PJSIP root directory. 
    65  1. Make sure that the JNI part of the application is built using {{{ndk-build}}}. For reference, check apjsua's {{{Android.mk}}} build config in {{{pjsip-apps/src/apjsua/jni}}}, it contains sample of how to import PJSIP build settings (build search paths, build flags, etc) and SWIG invocation. 
     65 1. Make sure that the JNI part of the application is built using {{{ndk-build}}}. For reference, check pjsua's {{{Android.mk}}} build config in {{{pjsip-apps/src/pjsua/android/jni}}}, it contains sample of how to import PJSIP build settings (build search paths, build flags, etc) and SWIG invocation. 
    6666 1. Enable NDK plugin for Eclipse, check [http://tools.android.com/recent/usingthendkplugin this] and follow the instructions. 
    6767     - CDT can also be fetched from [http://www.eclipse.org/cdt/downloads.php CDT download page], normally Eclipse for C/C++ will have CDT installed, just make sure that the CDT version is 7.0.2 or newer.