How to build a Bluetooth status widget in Xamarin.Android
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Building a Bluetooth status widget with Xamarin

bluetooth logobluetooth logo

This is an example of how to build a simple status widget in Xamarin, using the Bluetooth adapter as a source.

It demonstrates:

  • Building a class with the right properties and attributes to be treated as a widget
  • Setting up a BroadcastReceiver to receive intents.
  • Capturing specific intents related to widget updates and bluetooth adapter state changes
  • Managing the behaviour and display of the widget UI based on those intents.

The project can be opened and built in either Xamarin Studio or Visual Studio (with the Xamarin add-in installed).

There's a blog post detailing exactly how it all fits together over on my blog at

It's published under the MIT license, so it's quite permissive. However one of the images is provided by a third-party, and was distributed as freeware, not for commercial use, so as it stands, it can't be sold onwards.