[Nice] Regarding LibNice build for Android

David Czech davidczech at acm.org
Mon Aug 6 19:20:25 PDT 2012


Hello Youness, Joyti.

I'm using libnice for my Google Summer of Code project (a pysoy client for
Android<http://www.google-melange.com/gsoc/project/google/gsoc2012/davidczech/5001>),
which uses libnice to establish a UDP connection to the pysoy server.
I've had success cross-compiling the latest libnice (from the git
repository) to the Android platform, but instead of using a Android.mk
file, I have used the NDK standalone toolchain.
I have found that using this standalone toolchain generally works better,
but whatever works for you. Of course, you will need to have libnice's
dependencies compiled first, glib etc.

Anyways, heres my simple libnice test running on my Android device (with
the IP addresses scrubbed, just in case):

> $ /data/local/a.out
> START nice_agent_gather_candidates
> cb_new_candidate.
> CB state change
> cb_component_state_changed: 1: NICE_COMPONENT_STATE_GATHERING
> cb_new_candidate.
> CB gather done
> CANDIDATE: 1 1 2013266431 UDP  IPADDRESSHIDDEN 41027 host
> CANDIDATE: 2 1 1677721855 UDP IPADDRESSHIDDEN 1027 srv


Documentation exists for the acquiring and using standalone toolchain in
the NDK docs. The only option I passed to ./configure was
--enabled-shared=no
(aside from --host=arm-linux-androideabi and my prefix). The reason for
disabling building shared libraries is because it doesn't really make sense
on the Android platform (dynamic libraries are bundled into the Android
packages) and because of an issue with versioned sonames (which most glib
libraries like libnice use) and the android packager (see
http://kapace-gsoc.blogspot.ca/2012/07/android-ndk.html for more info on
that).

Let me know if you need some more help.

Also, thank you Youness for working on libnice, it is a pretty cool library.

Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nice/attachments/20120806/c5c0c15b/attachment.html>


More information about the nice mailing list