title: Android: detect brightness (amount of light) in phone's surroundings using the camera?
body: <p>The following applies to the Android operating system.</p>
  
  <p>I am trying to estimate how dark (or light) it is in the room where the phone is located using the camera.</p>
  
  <p>The idea is that the camera can return a certain brightness level, which I can use to determine the amount of light in the surroundings of the phone.</p>
  
  <p>My question is simple: how do I use the camera (either the front of back camera) to get this amount of brightness (the "amount of light")?</p>
  
  <p>Thanks in advance.</p>