Flashlight Torch - Bright LED 1.1



Publisher Description



This Flashlight Torch is very simple based on computer's 0 1. Where 0 = Off and 1 = On !
Its works even when your screen is off or you turn off your screen to save power. It is having Bright LED algorithm which ensures you the Bright Flash Light. Being eco friendly, It uses black background to save energy.
State of the art flash icon, opens in fraction of second and keep lights on until you turn it off.

NOTE : If you want to run app in background just open Flashlight torch - Bright LED, which turn on automatically, Press home button and Flashlight Torch will be minimised.
If you encounter any issue while turning off.Then simply open the app Press Back button on your phone. Light will be off.

Here is the code How it works :
------------->>>>>>
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnSwitch = (ImageButton) findViewById(R.id.btnSwitch);

// get the camera
getCamera();

toggleButtonImage();

btnSwitch.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
if (isFlashOn)
{
turnOffFlash();
} else
turnOnFlash();
}
}
});
}
// Get the camera
private void getCamera() {
if (camera == null) {
try {
camera = Camera.open();
params = camera.getParameters();
} catch (RuntimeException e) {
Log.e("Camera Failed to Open", e.getMessage());
}
}
}
// Turning On flash
private void turnOnFlash() {
if (!isFlashOn) {
if (camera == null || params == null) {
return;
}
params = camera.getParameters();
params.setFlashMode(Parameters.FLASH_MODE_TORCH);
camera.setParameters(params);
camera.startPreview();
isFlashOn = true;

// changing button/switch image
toggleButtonImage();
}

}

// Turning Off flash
private void turnOffFlash() {
if (isFlashOn) {
if (camera == null || params == null) {
return;
}
params = camera.getParameters();
params.setFlashMode(Parameters.FLASH_MODE_OFF);
camera.setParameters(params);
camera.stopPreview();
isFlashOn = false;

// changing button/switch image
toggleButtonImage();
}

private void toggleButtonImage(){
if(isFlashOn){
btnSwitch.setImageResource(R.drawable.btn_switch_on);
}else{
btnSwitch.setImageResource(R.drawable.btn_switch_off);
}
}

@Override
protected void onDestroy() {
super.onDestroy();
}

@Override
protected void onPause() {
super.onPause();
}

@Override
protected void onRestart() {
super.onRestart();
}

@Override
protected void onResume() {
super.onResume();

if(hasFlash)
turnOnFlash();
}

@Override
protected void onStart() {
super.onStart();
getCamera();
}
@Override
public void onBackPressed() {
// TODO Auto-generated method stub
super.onBackPressed();
params = camera.getParameters();
params.setFlashMode(Parameters.FLASH_MODE_OFF);
camera.setParameters(params);
camera.stopPreview();
isFlashOn = false;

if (camera != null) {
camera.release();
camera = null;
}
Log.d("Camera","Back Pressed");
}
@Override
protected void onStop() {
super.onStop();
}
}
********************************************************
This is the codes Flashligh Torch - Bright LED is using !
If you need your app custom designed for you. Just Drop me mail with Subject :
"Modify Flashlight App for me"
Give your two pics for light_on and light_off Images!
Thanks !



About Flashlight Torch - Bright LED

Flashlight Torch - Bright LED is a free app for Android published in the System Maintenance list of apps, part of System Utilities.

The company that develops Flashlight Torch - Bright LED is Prabhakar Pandey. The latest version released by its developer is 1.1.

To install Flashlight Torch - Bright LED on your Android device, just click the green Continue To App button above to start the installation process. The app is listed on our website since 2016-09-03 and was downloaded 4 times. We have already checked if the download link is safe, however for your own protection we recommend that you scan the downloaded app with your antivirus. Your antivirus may detect the Flashlight Torch - Bright LED as malware as malware if the download link to in.ppandey.flashlighttorch is broken.

How to install Flashlight Torch - Bright LED on your Android device:

  • Click on the Continue To App button on our website. This will redirect you to Google Play.
  • Once the Flashlight Torch - Bright LED is shown in the Google Play listing of your Android device, you can start its download and installation. Tap on the Install button located below the search bar and to the right of the app icon.
  • A pop-up window with the permissions required by Flashlight Torch - Bright LED will be shown. Click on Accept to continue the process.
  • Flashlight Torch - Bright LED will be downloaded onto your device, displaying a progress. Once the download completes, the installation will start and you'll get a notification after the installation is finished.



RELATED PROGRAMS
Our Recommendations






BarCode2D-PNG


Click stars to rate this APP!

Users Rating:  
  0.0/5     0
Downloads: 4
Updated At: 2024-04-22
Publisher: Prabhakar Pandey
Operating System: Android
License Type: Free