Skip to content

Files

Latest commit

 

History

History

websocket

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

WebSocket Demo

Simple currencies prices app with WebSocket connection. Connections are implemented with OkHttp & Ktor libraries. WebSocket server is developed with Ktor see KtorServer.

The app displays random price changes for currencies every 5 seconds. The available currencies are the dollar, the euro, and the pound sterling.



Setup

Before run the app:

  1. Go to NetworkModule.kt and change the IP address to your machine address Line 30.
  2. Open cmd and set the WebSocket folder as current directory.
  3. Run the command java -jar Currency.jar
  4. Now you can run the app from the Android Studio.



Important

Do not close the cmd while the app is running!



Screenshots