Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to check if bluetooth is enabled programmatically?
- BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
- if (mBluetoothAdapter == null) {
- // Device does not support Bluetooth
- } else {
- if (!mBluetoothAdapter.isEnabled()) {
- // Bluetooth is not enable :)
- }
- }
- <uses-permission android:name="android.permission.BLUETOOTH" />
Add Comment
Please, Sign In to add comment