UPDATE:. Apparently, the problem is related to std :: atomic on Android, and since Boost.Asio uses it (by default), in combination with threads, one of them sometimes stalled. Fortunately, Boost.Asio simplifies the transition from Std.Atomic to Boost.Atomic, and this was taken care of in the Boost-for-Android project this commit .
See here for more error information.
We are developing a simple multiplayer game (not yet released) for Android using boost asio, and so far we have not had any problems. This is for question number 2.
What problems do you see?
If the problems are related to compilation and linking, these tips may be useful.
Add the following to your AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
Have this in your Application.mk file:
APP_STL := gnustl_static APP_CPPFLAGS += -frtti -fexceptions
And use this as a template for your Android.mk file:
LOCAL_PATH := $(call my-dir) BOOST_VERSION := 1_49 PROJECT_ROOT := $(LOCAL_PATH)/../../../.. BOOST_INCLUDE_PATH := /path/to/boost/headers BOOST_LIB_PATH := /path/to/boost/libraries
EDIT: How we are stepping up Android support. This is what we have in our Makefile:
git clone git://github.com/madadam/Boost-for-Android.git ./build-android.sh --boost=1.49.0 --with-libraries=chrono,program_options,system,thread /path/to/ndk
Please note that we use our own version of Boost-for-Android, this is only because it has a patch for the latest version of NDK r8d. We can also see from the command line that we are using upgrade version 1.49, which is currently the highest supported by Boost-for-Android.
If you want to know which Boost and Android NDK combinations are supported, check out the Boost-for-Android project. It contains directories called patches / boost - < X > / ndk-android < Y >, where X corresponds to the supported version of boost and Y to the supported version of NDK (shameless plugin: our 2 cents to the project :-)).