nordicsemi /Android-nRF-Blinky
nRF Blinky is an application developed targeting an audience of developers who are new to Bluetooth Low Energy
★ 300⑂ 152👁 14⑃ 88● 55▤ 26◈ 0
300
stars
152
forks
14
watchers
88
prs
55
issues
26
releases
0
discussions
README
nRF Blinky for Android nRF Blinky is an application targeting an audience of developers who are new to Bluetooth Low Energy. The app can be easily modified to work with other devices and may act as a template app. This very simple application contains two basic features: turning on a LED on a connected Bluetooth LE device, receiving a Button press and release events from the device. Based on these 2 states, the derived flows allow to detect: button click events (press and release), long button click events (pressed for longer than 1 second). nRF Blinky demonstrates how to implement basic Bluetooth LE operations (blinking) or binding flows and states (control the LED state based on the button state). !Scanner !Blinky In mock flavor an additional UI allows to control the mock environment and the virtual device: !Mock controls Kotlin BLE Library This app is designed to work as a sample app for the Kotlin BLE Library. It demonstrates how a connection can be handled using a Service with a clear separation of the Bluetooth LE logic from the App using a Blinky interface. The Bluetooth LE logic is implemented in the LedButtonServiceImpl class, which is injected as a "profile". Flavors The :app module comes in 2 flavors: native and mock. The native flavor uses the native implementation of Kotlin BLE Library (NativeAndroidEnvironment and CentralManager), while the mock one uses mock implementation (MockAndroidEnvironment and CentralManager with mock peripherals set up). Structure The nRF Blinky application has been created in Jetpack Compose. Dependencies It is using the following libraries: Kotlin BLE Library - handles Bluetooth LE connectivity Nordic Common Library for Android - theme and common UI components, e.g. scanner screen nRF Logger tree for Timber - logs to nRF Logger app using Timber Nordic Gradle Plugins - set of Gradle plugins for building and deployment The Gradle script is using version catalog for dependency management. Modules The application consists of the following modules: :app - the main module, contains the application code :scanner - contains the scanner screen navigation entry :blinky:spec - contains the Blinky device specification, i.e. Blinky API or the Service UUID :blinky:ble - contains the BLE related code, i.e. BlinkyManager implementation :blinky:ui - contains the UI related code, i.e. BlinkyScreen or BlinkyViewModel implementation, and the BlinkyService The :blinky:ui and :blinky:spec modules are transport agnostic. The Bluetooth LE transport is specified in the :app module using Hilt here. The app is using Navigation 3. The :app module defines navigation in App composable. The entries are defined in the :scanner and :blinky:ui modules. Nordic LED and Button Service (LBS) Service UUID: 00001523-1212-EFDE-1523-785FEABCD123 A simplified proprietary service by Nordic Semiconductor, containing two characteristics: - LED state (On/Off). - UUID: 00001525-1212-EFD
Top issues
Latest release
4.2.0 4.2.0 2026-10-30What's Changed Migrate to Kotlin BLE Library 2.0.0-beta09 by @philips77 in https://github.com/nordicsemi/Android-nRF-Blinky/pull/139 Run BlinkyManager tests in virtual time by @philips77 in https://github.com/nordicsemi/Android-nRF-Blinky/pull/141 Add Release workflow and unit tests by @philips77 in https://github.com/nordicsemi/Android-nRF-Blinky/pull/140 Other Update dependency no.nordicsemi.gradle:nordic-version-catalog to v2026.10.00 by @renovate[bot] in https://github.com/nordicsemi/Android-nRF-Blinky/pull/132 and https://github.com/nordicsemi/Android-nRF-Blinky/pull/138 Upd