An Android application that collects sensor data from phones and tablets and streams it to a remote OpenSensorHub (OSH) server using OGC standards (SOS-T and Connected Systems API).
On-Device:
- GPS location
- IMU (accelerometers, gyroscopes, magnetometers)
- Fused orientation (quaternions or Euler angles)
- Video camera (H.264, H.265, VP8, VP9, MJPEG)
- Audio microphone (AAC, OPUS)
External (USB / Bluetooth / BLE):
- FLIR One thermal camera (USB)
- Trupulse 360 range finder (Bluetooth)
- Angel Sensor wrist band (BLE)
- Kestrel weather meter (BLE)
- Polar H9/H10 heart rate monitor (Bluetooth)
- Meshtastic mesh radio (Bluetooth)
- STE radiation pager
- BLE beacons
- Garmin Wearable Sensor
- Android device running Android 14 (API 34) or later
- JDK 17
- Android SDK with Build Tools 30.0.2 and API level 33 installed
- Android Studio (recommended) or Gradle 7.4+ for command-line builds
- Git (with submodule support)
git clone --recursive https://github.com/botts-innovative-research/osh-android.git
cd osh-androidIf you already cloned without --recursive, initialize the submodules separately:
git submodule update --init --recursiveThis pulls in two required submodule dependencies:
- osh-core -- the core OpenSensorHub framework
- osh-addons -- additional sensor drivers and processing modules
Create or verify the local.properties file in the project root:
sdk.dir=/path/to/your/Android/sdkOn macOS this is typically ~/Library/Android/sdk. On Linux it is often ~/Android/Sdk.
- Open Android Studio
- File > Open and select the
osh-androidproject directory - Wait for Gradle sync to complete
- Build > Build Bundle(s) / APK(s) > Build APK(s)
- The APK is output to
sensorhub-android-app/build/outputs/apk/debug/
./gradlew build -x test -x javadoc -x lintDebugThe APK is output to sensorhub-android-app/build/outputs/apk/debug/.
Connect an Android device via USB with USB debugging enabled (Settings > Developer Options > USB Debugging), then run:
./gradlew installDebugosh-android/
sensorhub-android-app/ # Main demo application (APK)
sensorhub-android-service/ # Background SensorHub service library
sensorhub-android-lib/ # Dependency aggregation library
sensorhub-driver-android/ # Core Android sensor & camera driver
sensorhub-android-polar/ # Polar heart rate monitor driver
sensorhub-android-meshtastic/# Meshtastic mesh radio driver
sensorhub-android-ste/ # STE radiation pager driver
sensorhub-android-flirone/ # FLIR One thermal camera driver
sensorhub-android-blebeacon/ # BLE beacon detector driver
submodules/
osh-core/ # Core OSH framework
osh-addons/ # Additional drivers & processing
- Gradle sync fails: Verify that submodules are initialized (
git submodule update --init --recursive) and thatlocal.propertiespoints to a valid Android SDK. - Build errors with JDK: Ensure JDK 17 is installed and selected in Android Studio (File > Settings > Build > Gradle > Gradle JDK).
- App crashes on launch: Confirm the device runs Android 14 (API 34) or later.
- No data reaching server: Check that the server IP/port are correct, and the device has network connectivity.
- Bluetooth sensors not connecting: Pair the external sensor in Android system Bluetooth settings before enabling it in the app.