Introducing MAUIBleScanner: A Cross-Platform BLE Scanner Built with .NET MAUI and Shiny

Xamarin Tips & Code Samples

I’m thrilled to announce my first public open-source project: MAUIBleScanner, a cross-platform Bluetooth Low Energy (BLE) scanner for iOS and Android!

You can check out the full source code on GitHub: https://github.com/wagenheimer/MAUIBleScanner

The Motivation

As a developer working with .NET MAUI, I often dive into projects involving hardware communication. Bluetooth Low Energy is a fantastic technology, but implementing it from scratch can be challenging, involving a lot of boilerplate code and platform-specific intricacies.

I wanted to create a clean, straightforward, and reusable starting point for anyone needing to scan for BLE devices in a .NET MAUI application. This project serves not only as a practical tool but also as a learning resource for developers new to BLE in the .NET ecosystem.

Core Technologies

The project is built on a modern and powerful tech stack:

  • .NET MAUI: For creating a beautiful, single-codebase UI that runs natively on both Android and iOS.
  • Shiny Framework: This is the star of the show for BLE communication. Shiny brilliantly abstracts away the platform-specific complexities of Bluetooth, allowing us to work with a clean, cross-platform API. Getting Started | Shiny.NET
  • MVVM Pattern: The application is structured using the Model-View-ViewModel (MVVM) pattern to ensure a clean separation of concerns, making the code easy to understand, maintain, and test.

Key Features

  • Device Scanning: Start and stop scanning for nearby BLE devices.
  • Real-time Results: Discovered devices are displayed in a list as they are found.
  • Device Details: Shows essential information like the device name, UUID/Address, and signal strength (RSSI).
  • Cross-Platform: A single codebase that works seamlessly on both iOS and Android.

Who is this for?

This repository is perfect for:

  • .NET developers looking for a practical example of BLE implementation in MAUI.
  • Hobbyists and makers who need a simple tool to discover and debug their BLE peripherals.
  • Students learning about cross-platform development and hardware communication.

Get Involved!

This is an open-source project, and I welcome any and all contributions. Whether it’s reporting a bug, suggesting a new feature, or submitting a pull request, your feedback is invaluable.

Go ahead, clone the repository, run the app, and let me know what you think. And if you find it useful, don’t forget to give it a star on GitHub! ⭐

Leave a Reply

Your email address will not be published. Required fields are marked *