1/* 2 * libwebsockets Android client - libwebsockets test application for Android 3 * 4 * Copyright (C) 2016 Alexander Bruines <alexander.bruines@gmail.com> 5 * 6 * This file is made available under the Creative Commons CC0 1.0 7 * Universal Public Domain Dedication. 8 * 9 * The person who associated a work with this deed has dedicated 10 * the work to the public domain by waiving all of his or her rights 11 * to the work worldwide under copyright law, including all related 12 * and neighboring rights, to the extent allowed by law. You can copy, 13 * modify, distribute and perform the work, even for commercial purposes, 14 * all without asking permission. 15 * 16 * The test apps are intended to be adapted for use in your code, which 17 * may be proprietary. So unlike the library itself, they are licensed 18 * Public Domain. 19 */ 20 21This directory contains an Android Studio (2.1.1) project that builds 22libwebsockets (+ openssl + zlib) and an Android application that is able 23to connect to the 'dumb-increment-protocol' of the libwebsockets test server. 24 25Building the native libraries requires the Android NDK which can be 26installed using the SDK manager. 27 28The app/src/main/jni/NativeLibs.mk is fully integraded with Gradle but will 29only work on Linux and requires the following applications to be available 30in addition to the NDK: 31 32 awk cmake egrep git tar wget makedepend 33 34(makedepend can be installed from (Debian) xutils-dev) 35 36To build the project: 37 38- Open an 'existing project' with Android Studio and select this directory. 39 (answer yes/ok to the question to integrate with Gradle). 40 41- Open the file app/src/main/jni/Application.mk and make sure NDK_ROOT 42 is set correctly and that APP_PLATFORM is set to the appropriate API level. 43 44- Build the project with CTRL+F9 45 (open the gradle console to follow the build progress). 46 47- Install APK to device and run. 48 49- Connect to libwebsockets test server. 50 51 52