Skip to content
Snippets Groups Projects
Select Git revision
  • e24852d9433d165d04897751549b4a00170e37e9
  • master default protected
  • release/202005
  • release/202001
  • release/201912
  • release/windows-test/201910
  • release/201908
  • release/201906
  • release/201905
  • release/201904
  • release/201903
  • release/201902
  • release/201901
  • release/201812
  • release/201811
  • release/201808
  • wip/patches_poly_2017/cedryk_doucet/abderahmane_bouziane
  • releases/beta1
  • android/release_464
  • android/release_463
  • android/release_462
  • android/release_461
  • android/release_460
  • android/release_459
  • android/release_458
  • android/release_457
  • android/release_456
  • android/release_455
  • android/release_454
  • android/release_453
  • android/release_452
  • android/release_451
  • android/release_450
  • android/release_449
  • android/release_448
  • android/release_447
  • android/release_446
  • android/release_445
38 results

jami-client-android

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Alexandre Lision authored
    e24852d9
    History
    This repository is meant for the porting of SFLphone to Android.
    
    
    To build SFLphone and all its dependencies, make sure that Android's NDK and SDK
    are properly installed on your system. 
    
    You have also to make sure that the following environment variables are defined:
    
    export ANDROID_NDK=$HOME/path/to/android-ndk-r*b
    export ANDROID_SDK=$HOME/path/to/android-sdk-linux
    
    The path to the required Android's build executable must be also specified:
    
    export PATH=$PATH:$ANDROID_NDK
    
    BUILD
    -----
    install swig-2.0.6 or later and python-2.7 or later on your system
    
    $ cd sflphone-android
    
    Check that following files are executable:
      jni/sflphone/daemon/src/JavaJNI2CJNI_Load.py
      make-swig.sh
    
    Compile pjsip-android
    $ pushd jni/pjproject-android/
    $ make realclean
    $ TARGET_ABI=armeabi-v7a ./configure-android-patched --use-ndk-cflags --disable-sound --disable-oss --disable-video --enable-ext-sound --disable-speex-aec --disable-g711-codec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-sdl --disable-ffmpeg --disable-v4l2
    $ make dep && make
    $ popd
    
    Configure deamon for Android
    $ pushd jni/sflphone/daemon/
    $ ./configure-android.sh
    $ popd
    
    Generate dbus interface
    $ ./make-swig.sh
    
    $ pushd jni/
    $ ndk-build APP_ABI=armeabi-v7a -j4
    $ popd
    
    Check that no errors occurred. In particular, following files should have been generated by make-swig.sh:
      sflphoneservice_loader.c
      callmanager_wrap.cpp
      sflphoneservice.java
      sflphoneserviceJNI.java
      ManagerImpl.java
    
    
    Then build android project with your favorite JDK: eclipse, intellijidea or ant.
    
    
    
    ************************** GENYMOTION HOW TO *************************
    
    Genymotion is an open source project to run Android VMs with standard images (Nexus, 4, 7, 10, Xperia etc.) on top of VirtualBox.
    
    www.genymotion.com/
    
    Pros: 
        - Very fast
        - Integrated to IDEs (tested with IntellijIDEA)
        - Can be integrated in jenkins as well
        - Offers 20+ different devices
    
    Cons:
        - Not actually a negative point, but as it is based on VirtualBox, these Vms needs x86 images to run. SFLphone is only built for arm arch, and needs to be recompiled for x86.
        This concerns only the JNI part of the project.
    
        Android provides an option APP_ABI parameter, defining for which arch it is built (it can be more than one at the same time)
    
        Issue: Pjsip uses a custom build system, and does not support parallel builds. So each time you want to switch arm/x86, pjsip needs to be recompiled using
    
        $ make realclean
        $ TARGET_ABI=INSERT_ARCH_HERE ./configure-android-patched --use-ndk-cflags --disable-sound --disable-oss --disable-video --enable-ext-sound --disable-speex-aec --disable-g711-codec --disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec --disable-speex-codec --disable-ilbc-codec --disable-sdl --disable-ffmpeg --disable-v4l2
    
        And don't forget to rebuild the rest of the JNI project with:
        $ ndk-build APP_ABI=INSERT_ARCH_HERE -j4
    
    
    Notes:
    
        - Using SFLphone on VMs:
            By default, Android VMs are in their own virtual NAT, which blocks RTP communications in SFLphone. To be more precise, RTP stream will work FROM the VM to the outside, but it won't be able to receive incoming streams.
    
            To solve that problem, you need to  change VirtualBox settings of the Android VMs.
            After creating a VM with Genymotion wizard, open VirtualBox. You should see that the VM appears there (the factory-backup). Right-click on it -> Settings.
    
            In the network panel, leave the first Adapter as it is (Host-only, vboxnet0).
            In the second adapter tab, switch NAT, to Bridged Adapter.
    
            Now, when running your Android VM, you should have an IP adress on the same NAT as your desktop, allowing data streams to be correctly sent TO/FROM your VM.
    
    
    
    ************************** JENKINS HOW TO *************************
    
    
    SFLphone android uses jenkins to run tests on genymotions emulators.
    
    To manage available emulators:
    
      - start ssh graphical session as jenkins user: ssh -X jenkins@hostname
      - enter jenkins password (availbale in sflvault)
      - run ./genymotion: UI should be streamed to your computer