Get the BluetoothAdapter and Enable
The following code will get the BluetoothAdapter class, which is necessary for device discovery. This code also checks that the Android device has Bluetooth enabled and will request that the user enable Bluetooth if it is currently disabled. Notice, this portion of the process is identical to what would be performed if connecting with a Bluetooth Classic device. However, after this step, the similarities cease.