que estoy tratando de hacer esto:Error al verificar si Bluetooth está activado en Android (REQUEST_ENABLE_BT no se puede resolver de una variable)
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);
}
}
pero me sale este error:
REQUEST_ENABLE_BT cannot be resolved to a variable
¿Cómo puede ¿Lo arreglo?
Me sorprende que esta respuesta no tenga un -100 porque es incorrecta desde el principio hasta el final. 1) No puede anular un método con una firma diferente (excepto para los subtipos covariantes). 2) No puede anular un método y reducir su nivel de acceso. 3) No dio ninguna pista de lo que debería ser en este nuevo método y por qué es necesario. 4) Agregar un método diferente no ayuda a responder para qué se debe usar el parámetro del método existente. 5) cambiar el nombre de un parámetro no afecta su función 6) su ALL_CAPS mezclado con camelCase es muy extraño. Uf. – JHH