An open API service indexing awesome lists of open source software.

https://github.com/oblakr24/blescanner

A BLE device scanner app with BLE characteristic interaction functionalities
https://github.com/oblakr24/blescanner

ble bluetooth compose compose-navigation coroutines-flow jetpack-compose material3-android rxjava3

Last synced: 3 months ago
JSON representation

A BLE device scanner app with BLE characteristic interaction functionalities

Awesome Lists containing this project

README

        

# BLE Device Detection App

This is a demonstration app designed for detecting nearby BLE (Bluetooth Low Energy) devices, connecting to them,
listing their services and characteristics, and interacting with those characteristics.

Its purpose is to demonstrate the BLE functionalities, Coroutines and Rx interoperability and testing approaches.

## Video

https://github.com/oblakr24/BLEScanner/assets/32245831/8a6e36a4-d703-48b5-b703-b33e4b1bf2e6

## Usage

1. **Scan for devices:** Run the app and it will display a list of nearby BLE devices. Click on a device to proceed.

2. **Connect to a device:** Once you're in the connection screen, click on the "Connect" button. This will trigger a discovery process for the services and characteristics of the chosen device.

3. **Interact with characteristics:** Clicking on a characteristic will open a dialog that allows for interactions. Once an action is performed, the dialog closes and the corresponding event should appear in the logs.

## Technologies

**This app is made using:**

- Jetpack Compose for UI with Material 3 and dark/light mode support
- RxJava 3 for the BLE module
- Coroutines for bridging the BLE functionalities with the Flows on the app module

**Stack:**
- MVVM architecture (mix of MVVM and MVI)
- RxJava3 in the BLE module
- Coroutines/Flows on the app module for interacting with RxJava3 observables from the BLE module
- [Jetpack Compose](https://developer.android.com/jetpack/compose) and [Compose Navigation](https://developer.android.com/jetpack/compose/navigation): UI
- [Hilt](https://dagger.dev/hilt/) for dependency injection
- [KotlinX Serialization](https://github.com/Kotlin/kotlinx.serialization) for serialization and deserialization of models into and from files
- [Retrofit](https://github.com/square/retrofit) for network requests
- [Extended Material icons](https://developer.android.com/jetpack/androidx/releases/compose-material) for vector images
- [Accompanist Permissions](https://github.com/google/accompanist/tree/main/permissions) for Composable permission handling
- [DataStore](https://developer.android.com/topic/libraries/architecture/datastore) for persisting user preferences
- [MockK](https://mockk.io/) for mocking in tests

## Permissions

Bluetooth permissions are required (depending on Android version) to allow for the full functionality set.

## Screenshots