android: update readme with build and testing info

This commit is contained in:
Michael Maltese 2016-11-08 16:52:09 -08:00
parent a5c8d514a2
commit 89438ba0ac

View file

@ -228,6 +228,24 @@ cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mxe/usr/x86_64-w64-mingw32.static/share
make
```
### Building for Android
Install the dependencies:
* cmake
* Android NDK
The Android NDK provides a CMake toolchain file for cross-compilation starting in version r13. Run the following, where "ANDROID_NDK_HOME" is the root folder of the NDK:
```
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake" -DANDROID_PLATFORM=android-21
make
```
If you are compiling for an emulator, you probably also want to add the CMake variable `-DANDROID_ARCH=x86`. Further variables are documented in the toolchain file.
### Testing
For each backend, do the following:
@ -254,6 +272,12 @@ For each backend, do the following:
0. Run `./latency` and make sure the printed beeps line up with the beeps that
you hear.
### Testing for Android
Currently when run from the command-line, input streams always fail at
`soundio_instream_open` due to the Android permissions model. Input devices will
only work in full-featured Android apps.
### Building the Documentation
Ensure that [doxygen](http://www.stack.nl/~dimitri/doxygen/) is installed,