Connect to a Bluetooth Serial Device with Xamarin.Android

I have been exploring the Xamarin tools recently and decided to try my hand at connecting some Bluetooth hardware to Android for a project that will be released soon. I have learned quite a bit about Bluetooth on Android and decided to write up a short description on how to connect to a Bluetooth serial device via RFCOMM/SPP.

First, grab an instance of the default BluetoothAdapter on the Android device and determine if it is enabled:

BluetoothAdapter adapter = BluetoothAdapter.DefaultAdapter;  
if(adapter == null)  
    throw new Exception("No Bluetooth adapter found.");

if(!adapter.IsEnabled)  
    throw new Exception("Bluetooth adapter is not enabled.");

Next, get an instance of the BluetoothDevice representing the physical device you’re connecting to. You can get a list of currently paired

Read More

Visual Studio Live! – Chicago 2014

I will be presenting 2 sessions and speaking on the closing panel at Visual Studio Live! in Chicago this May 5-8.  The conference is a full 4 day event and there’s still time to register and save $200 if you register before 4/16/14!  For this event, I’ll be presenting:

TH10 Performance and Diagnostics Hub in Visual Studio 2013
Date:
Thursday, May 8, 2014
Time: 11:00am – 12:15pm
Level: Intermediate

Visual Studio 2013 has introduced a new Performance and Diagnostics hub which encompasses a variety of new and old tools to profile your Windows Store applications. In this session, we will take a detailed look at all of the tools that the Performance and Diagnostics Hub has to offer

Read More

Visual Studio Live! – Las Vegas 2014

imageI will be presenting 3 sessions at Visual Studio Live! in Las Vegas this March 10-14.  The conference is a full 5 day event and there’s still time to register and save $500 if you register before 1/22/14!  For this event, I’ll be presenting:

LT20 Controlling Hardware using Windows 8.1
Date:
Tuesday, March 11, 2014
Time: 4:15pm – 5:30pm
Level: Introductory

Windows 8.1 allows developers to communicate with a variety of devices through several interfaces. In this session, we will look at how to talk to hardware connected via USB and Bluetooth, as well as some of the new APIs which allow Windows 8.1 to talk to Point of Sale (POS) devices, scanners, and even

Read More

Visual Studio Live! - Chicago 2013

imageI will be presenting a session at Visual Studio Live! in Chicago this May 13-17 at the Hilton Chicago.  The conference is a full 5 day event and there’s still time to register and save $400!

W01 Building Your First Windows Phone 8 Application
Date:
Wednesday, May 15, 2013
Time: 9:15 am - 10:30 am
Level: Introductory

Expand your mobile horizons with Windows Phone 8!  Developing applications for the phone is extremely similar to building a XAML application for the desktop.  In this session, I will demonstrate the fundamentals of Windows Phone development while building a very simple application which covers all of the important points of the new platforms architecture, including the developer tools and device emulator and

Read More

Async Goodness at Tech Valley .NET User Group

imageI’ll be giving a session to the Tech Valley .NET Users Group (TVUG) Tuesday, March 13th at 6:30pm on the new async goodness that exists in .NET 4.5 and C# 5.0, as well as the Visual Studio Async CTP which can be used with Visual Studio 2010.  Here's the description:

Title: Writing Asynchronous Code Using .NET 4.5 and C# 5.0
Where: Tyler Technologies, Latham, NY
When: Tuesday, March 13th, 2012, 6:30-8:30PM

A variety of new features were added to the .NET 4.5 Framework, including support for easily writing asynchronous code. This session will introduce the concepts of asynchronous programming, .NET Tasks, how to ensure your UI remains responsive, and how to do all of

Read More