Source code of a project for an Android application with bluetooth communication
In this simple template project, with a few number of activities:
-
ConstraintLayout: recent layout to build UI introduced for Android app https://developer.android.com/reference/android/support/constraint/ConstraintLayout
-
Bluetooth connection with any Bluetooth device
-
sending bluetooth commands quickly and easily, as well as reading the answer
-
passing socket connection between different activities
-
passing of the data read between different activities using handler https://developer.android.com/reference/android/os/Handler
Simply download the code from repository and import every class in your project. Pay attention to:
- understand your bluetooth message protocol (request-response) and change the command to send
- manifest file: add every new activity
- build gradle: integrate your gradle project with the one downloaded