@Override
public void onSensorChanged(SensorEvent event) {
if(event.sensor.getType() == Sensor.TYPE_LIGHT){
textLIGHT_reading.setText("LIGHT: " + event.values[0]);
}
}
Here i am getting 100 .Value will change based on the surrounding . I want to change the theme based on the value getting from sensor . Like for night i want dark theme and for day i want light theme . What is range for dark ? in sensor
Try the above solution !!