How to get the brightness level from the camera Android -


i want brightness level android camera.

i need display light level detected android camera, there posibility ?

private final sensormanager msensormanager; private final sensor mlightsensor; private float mlightquantity;  public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.main);      // obtain references sensormanager , light sensor      sensormanager = (sensormanager)getsystemservice(sensor_service);     lightsensor = sensormanager.getdefaultsensor(sensor.type_light);      // implement listener receive updates      sensoreventlistener listener = new sensoreventlistener() {         @override          public void onsensorchanged(sensorevent event) {             lightquantity = event.values[0];         }      }       // register listener light sensor -- choosing      // 1 of sensormanager.sensor_delay_* constants.      sensormanager.registerlistener(              listener, lightsensor, sensormanager.sensor_delay_ui); }  

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -