OBD Logger is an Android application that connects to a Bluetooth OBD-II device to retrieve and display various engine parameters.
This application is created solely for testing purposes to demonstrate how to use the https://github.com/eltonvs/kotlin-obd-api library.
- Connect to a Bluetooth OBD-II device
- Retrieve and display engine parameters such as speed, RPM, mass air flow, runtime, load, and throttle position
- Display status messages and error messages
- Android device with Bluetooth support
- Bluetooth OBD-II device (e.g., V-LINK)
The application requires the following permissions:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>- Clone the repository:
git clone https://github.com/yourusername/obd-logger.git
- Open the project in Android Studio.
- Build and run the application on your Android device.
- Ensure that your Bluetooth OBD-II device is paired with your Android device.
- Open the OBD Logger application.
- Click the "Connect" button to connect to the OBD-II device.
- The application will display the retrieved engine parameters and status messages.
The MainActivity class is the entry point of the application. It initializes the Bluetooth adapter and sets up the UI.
The ConnectThread class handles the Bluetooth connection to the OBD-II device and retrieves engine parameters.
The Utils class contains utility functions, such as rememberStatusBarHeight, to handle UI-related tasks.
The MainScreen composable function defines the main UI of the application, including the connect button and status messages.
Use the provided deploy script for quick development deployment:
# Full build and deploy
./deploy.sh
# Quick restart (skip build, just install and run)
./deploy.sh restartThe script automatically:
- Checks for connected Android device
- Sets up JDK 17 (required for this project)
- Builds the application
- Installs on device
- Launches the app
- Android Studio or Gradle
- JDK 17 (Amazon Corretto recommended)
- Android device with USB debugging enabled
- ADB (Android Debug Bridge)
This project is licensed under the MIT License. See the LICENSE file for details.