I created a Flashlight app a while back before Android 5.0 was released.
I recently bought a Nexus 6 and the app does not crash but the LED flashlight won't turn on.
After searching around, I believe it is because it is manufactured by Motorola and they don't seem to support Camera.Parameters.FLASH_MODE_TORCH
.
I have found several solutions online but none of them seem to be very viable.
Android Lollipop now has a native flashlight capability.
I have been looking through the source code trying to find it but can't seem to.
Does anyone know where in the Android 5.1 source code I can find how Android controls the camera LED for the flashlight?
Or how do they do it?