How to Make Flashlight App for Android ?
by prayag nao in Circuits > Mobile
11170 Views, 24 Favorites, 0 Comments
How to Make Flashlight App for Android ?
![Screenshot_2016-03-24-20-51-14_com.RoboKon.flashlight.png](/proxy/?url=https://content.instructables.com/F05/40O7/IM53WIJH/F0540O7IM53WIJH.png&filename=Screenshot_2016-03-24-20-51-14_com.RoboKon.flashlight.png)
![Screenshot_2016-03-24-20-51-07_com.RoboKon.flashlight.png](/proxy/?url=https://content.instructables.com/FGF/1035/IM53WII2/FGF1035IM53WII2.png&filename=Screenshot_2016-03-24-20-51-07_com.RoboKon.flashlight.png)
Hello
Today we are gonna to make an android app.it will turn on your moblie flash light so you can use it when we need light.so lets start.............
Initial Setup
![Screen Shot 2016-03-24 at 8.33.54 pm.png](/proxy/?url=https://content.instructables.com/FQF/N3Z6/IM53W32P/FQFN3Z6IM53W32P.png&filename=Screen Shot 2016-03-24 at 8.33.54 pm.png)
![Screen Shot 2016-03-24 at 8.34.22 pm.png](/proxy/?url=https://content.instructables.com/FMP/98JY/IM53W33M/FMP98JYIM53W33M.png&filename=Screen Shot 2016-03-24 at 8.34.22 pm.png)
![Screen Shot 2016-03-24 at 8.34.35 pm.png](/proxy/?url=https://content.instructables.com/FIT/HE00/IM53W33Z/FITHE00IM53W33Z.png&filename=Screen Shot 2016-03-24 at 8.34.35 pm.png)
![Screen Shot 2016-03-24 at 8.34.52 pm.png](/proxy/?url=https://content.instructables.com/FI4/EGW9/IM53W35T/FI4EGW9IM53W35T.png&filename=Screen Shot 2016-03-24 at 8.34.52 pm.png)
![Screen Shot 2016-03-24 at 8.35.02 pm.png](/proxy/?url=https://content.instructables.com/FM6/CI33/IM53W38W/FM6CI33IM53W38W.png&filename=Screen Shot 2016-03-24 at 8.35.02 pm.png)
Just open android studio and click on new android studio project
now click next.
now give a name to app i.e. FlashLight.
now click next.
now select minimum SDK and click next.
now click on blank activity and click next.
now click on finish.
![Screen Shot 2016-03-24 at 8.35.48 pm.png](/proxy/?url=https://content.instructables.com/FN2/66I7/IM53W3AG/FN266I7IM53W3AG.png&filename=Screen Shot 2016-03-24 at 8.35.48 pm.png)
![Screen Shot 2016-03-24 at 8.36.15 pm.png](/proxy/?url=https://content.instructables.com/FRF/TJYI/IM53W3BB/FRFTJYIIM53W3BB.png&filename=Screen Shot 2016-03-24 at 8.36.15 pm.png)
![Screen Shot 2016-03-24 at 8.36.37 pm.png](/proxy/?url=https://content.instructables.com/FZ9/IAKO/IM53W3DJ/FZ9IAKOIM53W3DJ.png&filename=Screen Shot 2016-03-24 at 8.36.37 pm.png)
now a window will open named Content_Main.xml.
now right click on "Hello" in mobile layout and delete it.
now remove highlighted text in image.
![off.png](/proxy/?url=https://content.instructables.com/FDT/AVHC/IM53W4II/FDTAVHCIM53W4II.png&filename=off.png)
![on.png](/proxy/?url=https://content.instructables.com/F1J/2V9M/IM53W4JS/F1J2V9MIM53W4JS.png&filename=on.png)
![Screen Shot 2016-03-24 at 8.37.21 pm.png](/proxy/?url=https://content.instructables.com/FEV/IGXA/IM53W3FW/FEVIGXAIM53W3FW.png&filename=Screen Shot 2016-03-24 at 8.37.21 pm.png)
Now copy and paste give green and red button into res/drawable folder.
![Screen Shot 2016-03-24 at 8.39.43 pm.png](/proxy/?url=https://content.instructables.com/FV0/NDRJ/IM53W3GR/FV0NDRJIM53W3GR.png&filename=Screen Shot 2016-03-24 at 8.39.43 pm.png)
now just pick and place imageview into mobile layout and assign source image of green you just copied into drawable folder.
Menifest File
![Screen Shot 2016-03-24 at 8.46.12 pm.png](/proxy/?url=https://content.instructables.com/FZD/K9A3/IM53W3IO/FZDK9A3IM53W3IO.png&filename=Screen Shot 2016-03-24 at 8.46.12 pm.png)
![Screen Shot 2016-03-24 at 8.46.25 pm.png](/proxy/?url=https://content.instructables.com/FOQ/VG17/IM53W3JZ/FOQVG17IM53W3JZ.png&filename=Screen Shot 2016-03-24 at 8.46.25 pm.png)
Now just open Manifest file and copy and paste following command into manifest file.
You can download permissions from here Google Drive
![Screen Shot 2016-03-24 at 8.52.17 pm.png](/proxy/?url=https://content.instructables.com/FV7/FF7Y/IM53W59M/FV7FF7YIM53W59M.png&filename=Screen Shot 2016-03-24 at 8.52.17 pm.png)
![Screen Shot 2016-03-24 at 8.52.28 pm.png](/proxy/?url=https://content.instructables.com/F7L/03T9/IM53W5AL/F7L03T9IM53W5AL.png&filename=Screen Shot 2016-03-24 at 8.52.28 pm.png)
![Screen Shot 2016-03-24 at 8.52.40 pm.png](/proxy/?url=https://content.instructables.com/FYA/3QE7/IM53W5KJ/FYA3QE7IM53W5KJ.png&filename=Screen Shot 2016-03-24 at 8.52.40 pm.png)
Now right click on java file and select new class.Name this class "About".
Now just download and paste given code into About class.
Download code: Google Drive
![Screen Shot 2016-03-24 at 8.53.52 pm.png](/proxy/?url=https://content.instructables.com/FBL/089H/IM53W5LJ/FBL089HIM53W5LJ.png&filename=Screen Shot 2016-03-24 at 8.53.52 pm.png)
![Screen Shot 2016-03-24 at 9.29.23 pm.png](/proxy/?url=https://content.instructables.com/FZB/2IBI/IM53WFXD/FZB2IBIIM53WFXD.png&filename=Screen Shot 2016-03-24 at 9.29.23 pm.png)
now goto res=>layout and right click on it and select new=>layout resource file,name it "about".
now download code and paste into about file : Google Drive
![Screen Shot 2016-03-24 at 9.33.21 pm.png](/proxy/?url=https://content.instructables.com/FXI/C8WE/IM53WF5V/FXIC8WEIM53WF5V.png&filename=Screen Shot 2016-03-24 at 9.33.21 pm.png)
Now just open MainActivity class and paste given code below.
Download code: Google Drive
Finish
![Screen Shot 2016-03-24 at 9.41.57 pm.png](/proxy/?url=https://content.instructables.com/FXZ/IF42/IM53WHNT/FXZIF42IM53WHNT.png&filename=Screen Shot 2016-03-24 at 9.41.57 pm.png)
Now your FlashLight app is ready,just upload it into your mobile phone and enjoy.
you can download FlasLight.apk from below........
Thanks for watching pls vote it.