This is an Android Studio project that provides three Classes in order to deal with : Joystick and MQTT. Feel free to clone it and modify or just take some pieces of the code from it.
Clone the repo:
git clone https://github.com/Vincenzo-Petrolo/MQTT-Joystick-Controller.git
Open your Android Studio installation and simply File>Open> and search the project where you cloned it.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.