Is there any way to check is a device has a bluetooth adapter or not? I have a tablet that not has a bluetooth. So how can I handle that?
Add permission to Manifest
<manifest ... >
<uses-permission android:name="android.permission.BLUETOOTH" />
...
</manifest>
Code for Activity
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (bluetoothAdapter == null) {
//handle the case where device doesn't support Bluetooth
}
else
{
//bluetooth supported
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With