------------------------------ Important notice This project is dead and has been for a while. The code has not been ported to (and will not work on) newer Android firmware (Cupcake/Donut), and much more usable alternatives (such as Sipdroid<http://sipdroid.org/>) have appeared in the meantime. That leaves pretty much no reason why you would want to use it. ------------------------------ What is it
This is a little toy/educational project I've worked on recently, to see how hard would it be to add VoIP functionality to Android phones. It is based on the PJSIP <http://pjsip.org/> SIP stack and provides a very simple JNI layer implementing barely enough functions to do something useful with it from Java (I'm aware of the pjsip-jni<http://sourceforge.net/projects/pjsip-jni/>project, but it seemed like an overkill for my purposes). As a follow-up to this project, I wrote up a JNI Examples for Android<http://android.wooyd.org/JNIExample>document, which contains detailed explanations and an example of building a native library for Android, and calling it from Java. ------------------------------ Sample VoiDroid application The result of the project is a sample VoiDroid<http://android.wooyd.org/files/VoiDroid-debug.apk>application [ screenshot <http://android.wooyd.org/images/voidroid.png>], which you can install either using adb from Android SDK, or by pointing your phone's browser to this file, after verifying PGP signature<http://android.wooyd.org/files/VoiDroid-debug.apk.asc>. Necessary patches and build instructions for it are provided below. Note that it is more a proof-of-concept implementation than something usable, meaning that it is a bug-ridden, often-crashing, pre-alpha-quality application, so if you decide to install and use it, you are doing so completely *at your own risk*. It supports registration with the SIP provider and can optionally use an outbound proxy, enabling you to place calls from behind a fully-symmetric NAT (by virtue of magic provided by PSJIP <http://pjsip.org/>). From testing on my local wireless network I've learned that Android G1 provides fairly decent sound quality (both recording and playback) with SPEEX codec at 8kHz sampling rate and one audio channel (these settings are currently hardcoded in the JNI library), however I had to turn off echo cancelling completely, as it eats too much CPU (for same reason the device cannot do any kind of on-the-fly resampling). When calling remote sites the sound quality deteriorates somewhat, but I haven't tested the effect of different codecs and various knobs PJSIP offers, so it might be that it still can be improved. In the currently released version of Android software interaction with the audio layer is only possible by passing buffers corresponding to roughly 150ms of sound around, and this contributes to overall latency. Things are likely to improve in the upcoming Cupcake release, but it will require some minor porting, and I did not investigate it in much detail. ------------------------------ Licence All source files <http://android.wooyd.org/files> distributed from this site (if they are not auto-generated and include enough of non-trivial content) are licenced under MIT licence<http://www.opensource.org/licenses/mit-license.php>and include relevant copyright and licence notices near the top. ------------------------------ How to build - Download Android 1.1r1 SDK<http://developer.android.com/sdk/1.1_r1/index.html>and set up the build environment as described on this page. Verify that your environment works by trying to build some sample applications included with the SDK. - Set up the build environment, check out the Android source code as described at the Android Get source <http://source.android.com/download>page, and build it (instructions are available on that page as well). You want to check out the branch matching the downloaded SDK, so use -boption to initialize the repository: repo init -u git://android.git.kernel.org/platform/manifest.git -b release-1.0 The directory where Android source has been checked out to and built in will be referred to as ${ANDROID_DIR} in the rest of the document. - Download and unpack PJSIP <http://pjsip.org/> from PJSIP download page<http://www.pjsip.org/download.htm>. I've used version 1.0.2<http://www.pjsip.org/release/1.0.2/pjproject-1.0.2.tar.bz2>. The directory where PJSIP <http://pjsip.org/> is unpacked will be referred to as ${PJSIP_DIR} in the rest of the document. - Download and apply the patch for PJSIP<http://android.wooyd.org/files/pjsip.patch>: cd ${PJSIP_DIR} && patch -p1 < /path/to/pjsip.patch - Download and unpack the VoiDroid source<http://android.wooyd.org/files/VoiDroid-0.0.1.tar.bz2>. The directory where this source is unpacked will be referred to as ${VOIDROID_DIR} in the rest of the document. - Download the build-voidroid<http://android.wooyd.org/files/build-voidroid>script and run it to build the VoiDroid package: build-voidroid --android-dir ${ANDROID_DIR} --pjsip-dir ${PJSIP_DIR} --voidroid-dir ${VOIDROID_DIR} - Install the package onto the device: ${SDK_DIR}/tools/adb install -r ${VOIDROID_DIR}/bin/VoiDroid-debug.apk - If something does not work, debug as necessary until it works :-). ------------------------------ Support and contact As I mentioned above, this was something of an educational project, and it was fun while it lasted. I'm not really interested in working on it anymore, but hope that it might be useful for someone who wants to build VoIP applications for Android. If you are such person, feel free to take the code and run with it (and I would appreciate information about your project), that's what open source is all about, after all. Personally, I'm not willing to fix bugs, add new features or provide any other kind of support. If you still think that you have something to tell me, feel free to email me at jurij at wooyd dot org, but please don't be disappointed if you don't receive any reply. ------------------------------ *September 27, 2009* -- Salam, Agus Hamonangan [email protected] http://groups.google.com/group/id-gtug/ http://groups.google.com/group/id-android/ --~--~---------~--~----~------------~-------~--~----~ Google Groups "Indonesian Android Community [id-android]" group. To post to this group, send email to [email protected] To request to subscribe to this group, please visit the following page: http://groups.google.com/group/id-android/subscribe?hl=en-GB To send a message to the owner, visit the following page: http://groups.google.com/group/id-android/post?sendowner=1&hl=en-GB or [email protected] For more options, visit this group at http://groups.google.com/group/id-android?hl=en?hl=en-GB To unsubscribe from this group, send email to [email protected] Indonesian Android Community on Facebook http://www.facebook.com/group.php?gid=112207700729 -~----------~----~----~----~------~----~------~--~---
