0

Im a noob to android development and i want to make a simple camera application that automatically turns on the torch light if the lighting is very dark. I have read through android documentation for a camera method that would allow me to get a lightness/darkness value from the camera, but have been able to find one. I am using a surfaceview to display my camera. Is there some possible way to get a brightness or contrast value from the view in real time? any help is greatly appreciated.

B. Money
  • 931
  • 2
  • 19
  • 56
  • I think that this may have been what you read about: http://stackoverflow.com/questions/4738294/android-detect-brightness-amount-of-light-in-phones-surroundings-using-the-c – Alex K Oct 26 '14 at 20:09

1 Answers1

1

If i understand your question correctly, you need to access the light sensor. Look at this tutorial and it should point you in the right direction

Mr. Bojangles
  • 348
  • 2
  • 6
  • 15