How to Make Flashlight App for Android ?

by prayag nao in Circuits > Mobile

11150 Views, 24 Favorites, 0 Comments

How to Make Flashlight App for Android ?

Screenshot_2016-03-24-20-51-14_com.RoboKon.flashlight.png
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
Screen Shot 2016-03-24 at 8.34.22 pm.png
Screen Shot 2016-03-24 at 8.34.35 pm.png
Screen Shot 2016-03-24 at 8.34.52 pm.png
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
Screen Shot 2016-03-24 at 8.36.15 pm.png
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
on.png
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

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
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
Screen Shot 2016-03-24 at 8.52.28 pm.png
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
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

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

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.

Downloads