SimpleBLE

Examples

Example Android app for SimpleDroidBLE.

The SimpleBLE Explorer Android app lives in examples/simpleble-android.

It demonstrates:

  • requesting Android Bluetooth permissions with the Activity Result API,
  • explaining Android adapter selection,
  • scanning and showing discovered peripherals,
  • connecting and disconnecting cleanly,
  • listing services and characteristics with capabilities,
  • reading a selected characteristic,
  • writing with request or command,
  • subscribing to notify or indicate characteristics,
  • showing errors in the UI,
  • stopping scans on activity pause and cleaning up notification/connection work from the ViewModel.

Run it from Android Studio by opening examples/simpleble-android, or from the command line:

cd examples/simpleble-android
./gradlew :app:assembleDebug

Install the APK on an Android API 31+ device with BLE support.