Building a Bluetooth status widget with Xamarin
This is an example of how to build a simple status widget in Xamarin, using the Bluetooth adapter as a source.
- Building a class with the right properties and attributes to be treated as a widget
- Setting up a
BroadcastReceiverto 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 wislon.io
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.