README 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. This directory contains an Android Studio (2.1.1) project that builds
  21. libwebsockets (+ openssl + zlib) and an Android application that is able
  22. to connect to the 'dumb-increment-protocol' of the libwebsockets test server.
  23. Building the native libraries requires the Android NDK which can be
  24. installed using the SDK manager.
  25. The app/src/main/jni/NativeLibs.mk is fully integraded with Gradle but will
  26. only work on Linux and requires the following applications to be available
  27. in addition to the NDK:
  28. awk cmake egrep git tar wget makedepend
  29. (makedepend can be installed from (Debian) xutils-dev)
  30. To build the project:
  31. - Open an 'existing project' with Android Studio and select this directory.
  32. (answer yes/ok to the question to integrate with Gradle).
  33. - Open the file app/src/main/jni/Application.mk and make sure NDK_ROOT
  34. is set correctly and that APP_PLATFORM is set to the appropriate API level.
  35. - Build the project with CTRL+F9
  36. (open the gradle console to follow the build progress).
  37. - Install APK to device and run.
  38. - Connect to libwebsockets test server.