Reputation: 101
Is there a programmatically way to check if Bluetooth is active on an Android device?
To know if the Location is enabled it's like this:
if (!Input.location.isEnabledByUser)
{
//Location not active!
return;
}
Upvotes: 1
Views: 207
Reputation: 101
I guess you can just check the adapter state :
public void EnableIfNeeded(BluetoothAdapter adapter)
{
if (!adapter.IsEnabled)
{
adapter.Enable();
}
}
Upvotes: 2