Android FlashLight Torch App Development Tutorial

With help of android Camera and Camera.Parameters, we will develop Android Flashlight Torch Application.


 

[su_button url=”https://github.com/androidsrc/FlashLightSample” target=”blank” style=”stroked” background=”#51d461" color=”#ffffff” size=”6" center=”yes” radius=”0" icon=”icon: arrow-circle-o-down”]Download Full Source Code[/su_b[/su_button]p> 

[su_ca[su_carousel source=”media: 442,440,441" link=”lightbox” width=”900" height=”500" mousewheel=”no”]h3>FlashLight Application

1. Preparing Application Manifest File

For accessing Camera, we need to declare uses-permission to use it along with uses-feature.

You may also like...

28 Responses

  1. Inz says:

    this code is not working

  2. Inz says:

    when i run it on my laptop emulator its give me “Your device hardware does not support flashlight” and when i run it on my mobile it give me “app stopped” how can i solve these problems plz help me out

  3. Dua Khan says:

    thanks.. Its Working for me..

  4. Mahmoud Mosaad says:

    works fine, my advice for any one try this avoid any styling for button and do it with normal button and assure that the code works fine first then activate whatever u want on shape 🙂
    thanks for u 🙂

  5. A - Kay Qureshi says:

    Thanks it works fine….
    but when we import android.hardware.Camera; it shows camera is depriciated…. in API23

  6. hedi choura says:

    you can replace this if code
    ” if (isFlashSupported()) {
    camera = Camera.open();
    parameters = camera.getParameters();
    } else {
    showNoFlashAlert();
    }”

    by this code then it’s good for me
    “camera = Camera.open();
    parameters = camera.getParameters();”

    thanks a lot

  7. Qunal Jain says:

    Thank you!!

  8. zidd says:

    thanks it works!

  9. Abdul Rehman says:

    sir thanks for the wondefull tutorial but this is not working in marshmallow 6.0 api 23 https://uploads.disquscdn.com/images/34b7cb9c19cbcccecd1f2d9894a3b3ac6c05389b00bfad5b845f15a0d9828b0d.png

    please sir update the code and give any other link to resolve problem

  1. November 14, 2017

    […] Android FlashLight Torch Application Development Tutorial […]

  2. December 28, 2017

    […] Android FlashLight Torch Application Development Tutorial […]

  3. February 19, 2018

    […] Android App Tutorial. by ProxyAdmin · Published December 5, 2016 · Updated January 28, 2018. […]

  4. March 1, 2018

    […] Android App Development Tutorial. by ProxyAdmin · Published December 5 […]

  5. March 1, 2018

    […] Android App Development Tutorial. by ProxyAdmin · Published December 5 […]

  6. March 1, 2018

    […] Android App Development Tutorial. by ProxyAdmin · Published December 5 […]

  7. March 1, 2018

    […] Android App Development Tutorial. by ProxyAdmin · Published December 5 […]

  8. March 6, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  9. March 6, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  10. May 15, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  11. June 13, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  12. June 13, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  13. June 13, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  14. June 13, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  15. June 13, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  16. June 14, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  17. August 3, 2018

    […] Android FlashLight Torch Application Development Tutorial […]

  18. December 15, 2018

    […] Android FlashLight Torch App Development Tutorial […]

Leave a Reply

Your email address will not be published. Required fields are marked *