Android: Turning Flash ON/OFF

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

After playing with Android OS and messing with different IDE like Eclipse, IntelliJ, I finally settled down with Android Studio for Android App development. I definitely found it useful for the beginners who had no exposure of Java or Eclipse world.

With the newly found Euphoria, I thought I should start of with Simple Android program, Playing with Flash Light on Android Devices. But, It turned out to be not so straight forward, after following the developer documents. It once again proved that, the fragmentation issue Android was facing, where the solutions on stack overflow when you quickly search “Flash Light API in Android” look so obvious, but does not work on most of the devices

Here I am sharing the one which I got to work on Google Nexus 5, Android Lollipop. The Key here is to use setPreviewTexture() method on Camera object. 

Hope you find it useful.