A server-side Vert.x Kotlin demo application.
It serves as a backend for the Universal Android Music Player Sample and shows how to:
-
create a web server
-
interact with a relational database
-
stream files from the disk
Download or fork this repository, open it in a terminal and then run:
./gradlew web:vertxRun
The server starts listening on port 8080
.
Clone this fork of the Universal Android Music Player Sample and checkout the vertx-kotlin-music
branch:
git clone /~https://github.com/tsegismont/android-UniversalMusicPlayer.git
cd android-UniversalMusicPlayer
git checkout vertx-kotlin-music
This branch modifies the code so that:
-
the catalog is loaded from
http://10.0.2.2:8080/music.json
-
the data classes are shared with the web application.
Important
|
Do not forget to put the shared classes in your local Maven repo before importing the project in Android Studio. |
To do so, open a Terminal in the backend project directory and run:
./publish-to-mvn-local.sh
Then open Android Studio and import the project.
Finally, create or reuse a virtual device to deploy the mobile app.
Audio files in this repository come the YoutTube Free Music Library. They have been chosen because they do not require paternity attribution.