|
1 | 1 | # Kaazing Android WebSocket Echo Tutorial |
2 | 2 |
|
3 | | -This tutorial shows how Android application can communicate over the web with an `echo` service running within Kaazing WebSocket Gateway using Kaazing Java WebSocket Client library. The application sends text messages to the `echo` service over WebSocket. |
4 | | -The `echo` service, running inside the Kaazing WebSocket Gateway, reflects back the message that is received by the Android application. |
| 3 | +This Android app communicates with a remote `Echo` service hosted by Kaazing WebSocket Gateway. The app sends and receives text messages with the `Echo` service over WebSocket. |
5 | 4 |
|
6 | | -## Minimum Requirements for Running or Building Kaazing Android Echo WebSocket tutorial |
| 5 | +## Minimum Requirements for Running or Building |
7 | 6 |
|
8 | 7 | * Java 1.8 |
9 | 8 | * Gradle 2.10 or higher |
10 | 9 | * Android Studio 2.10 or higher |
11 | 10 | * Android SDK 4.4 or higher |
12 | 11 |
|
13 | | -## Steps for building and running the project |
| 12 | +## Steps for Building and Running the Project |
14 | 13 |
|
15 | 14 | - Build the application using Android Studio |
16 | 15 | - Open the project in Android Studio by navigating to the project directory |
17 | 16 | - Build the project by selecting Build/Rebuild Project |
18 | 17 | - Run the application in Android Simulator |
19 | | - - Create Android Virtual Device (AVD) for API level 19 (KitKat) or higher. For more information refer to [Create and Manage Virtual Devices](https://developer.android.com/studio/run/managing-avds.html) |
| 18 | + - Create an Android Virtual Device (AVD) for API level 19 (KitKat) or higher. For more information refer to [Create and Manage Virtual Devices](https://developer.android.com/studio/run/managing-avds.html) |
20 | 19 | - Run the application from Android Studio by selecting Run/Run Project. Refer to [Running Your App](https://developer.android.com/training/basics/firstapp/running-app.html) for more information. |
| 20 | + |
| 21 | +After installing Android Studio, update the following files with the Android SDK path or version (if necessary): |
| 22 | +- local.properties |
| 23 | +- project.properties |
| 24 | +- AndroidManifest.xml |
| 25 | +- app/build.gradle |
| 26 | + |
| 27 | +In you experience the error `Could not find or load main class org.gradle.wrapper.GradleWrapperMain`, add a wrapper in the build.gradle file: |
| 28 | + |
| 29 | +``` |
| 30 | +task wrapper(type: Wrapper) { |
| 31 | +gradleVersion = <gradle-version-installed> |
| 32 | +} |
| 33 | +``` |
21 | 34 |
|
22 | 35 | ## Interact with Kaazing Android WebSocket Client API |
23 | 36 |
|
24 | | -Checklist how to create Kaazing Android WebSocket Echo application from scratch, to be able to send and receive Echo messages over WebSocket can be found [here](http://kaazing.com/doc/5.0/websocket_client_docs/dev-android/o_dev_android.html). |
| 37 | +Documentation that explains how to create Kaazing Android WebSocket apps from scratch can be found [here](http://kaazing.com/doc/5.0/websocket_client_docs/dev-android/o_dev_android.html). |
25 | 38 |
|
26 | 39 | ## API Documentation |
27 | 40 |
|
|
0 commit comments