I'm trying to do this:
BluetoothAdapter bt = BluetoothAdapter.getDefaultAdapter(); if (bt == null){ //Does not support Bluetooth status.setText("Your device does not support Bluetooth"); }else{ //Magic starts. Let's check if it's enabled if (!bt.isEnabled()){ Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); startActivityForResult(enableIntent, REQUEST_ENABLE_BT); } } But I get this error:
REQUEST_ENABLE_BT cannot be resolved to a variable
How can I fix it?