Questions tagged [flashlight]

Most phones (and even tablets) have one or more camera/s. For optimal lighting, a white LED (or more than one) is used to illuminate the scene and act as a flash light.

Most phones (and even tablets) have one or more camera/s. For optimal lighting, a white LED (or more than one) is used to illuminate the scene and act as a flash light.
Some apps use this LED to turn the device into a portable torch.

369 questions
0
votes
2 answers

Android Turn on flashlight programmatically button

I am working on an app in which I need to be able to turn on the Torch Light of an Android Phone by button press. I have written some code. However upon button press the light does not turn on. Below is the relevant code. Please note, this is being…
PhoenixLament
  • 741
  • 1
  • 11
  • 32
0
votes
1 answer

Android flashlight crash mainactivity

Hi guys i'm trying to develop a flashlight app for my android phone but when i run it i get error. The GUI has 2 button: 1 for turn on the light and other for turn off light here is the code: package com.example.flash; import…
xXJohnRamboXx
  • 739
  • 3
  • 10
  • 24
0
votes
3 answers

Android 4.4 : Camera Flashlight blinks only few number of times

I have looked into other camera flashlight related problems in stackoverflow, but couldn't find an answer that solves my issue. The flashlight flashes for 6-8 times and then the app crashes. Here I have a blink() method that calls cameraon() and…
user3891554
  • 81
  • 2
  • 9
0
votes
2 answers

iOS6 flashlight does not work

I'm trying to make hello-world-type app to learn how to turn on/off flashlight. So there is only two buttons in this app: On and Off. Here is action for "ON" button: AVCaptureDevice *device = [AVCaptureDevice…
Maria
  • 755
  • 1
  • 11
  • 29
0
votes
1 answer

Firefox OS: How can I turn on the flash of camera?

i would like to keep the camera flash LED on. is there any specific API?
Marcelo Dolce
  • 69
  • 2
  • 7
0
votes
1 answer

Need to know LED flash light code in Android

I already got some code from diff resources but all the codes are not working for LED flashlight in my mobile.I have LG Optimus. But If i download some app from play store it works very fine. My activity code is Camera camera = null; …
Trisha
  • 13
  • 5
0
votes
1 answer

LED Flash Light not working when I start my apk in LG Optimus but when I download from play store its working

Please help me to understand where is exact problem. I download from google play store and thats woreking very fine but when I Run from my code led flashlight is not working. Blockquote My Code is: Camera camera = null; Parameters…
Trisha
  • 13
  • 5
0
votes
1 answer

How to turn on flashlight in an application on windows phone 8

I want to make an ap that turn on the flash when i press the On button, and turn off when I press the Off Button. This is my code : protected AudioVideoCaptureDevice Device { get; set; } private async void Button_Click_TurnOn(object sender,…
user2565280
  • 357
  • 2
  • 6
  • 20
0
votes
2 answers

Android Flashlight Help neded

Is there a way to code the power of the android phone flashlight 20%,30%,40% ? I don't need the code just an answer to the question, if there is one i will want to find it myself thank you
0
votes
1 answer

Nexus5 Flash Light issue?

I am trying to turn on Nexus5 flash light in android, but I found an error in logcat. Is it possible to turn it on or not? My code is here: Activity Java public class MainActivity extends Activity { Camera camera; Parameters parameters; …
Nadeem
  • 51
  • 1
  • 1
  • 10
0
votes
1 answer

Flashlight (Torch) is opening but not closing

Following is the code which I used for opening Torch and closing it. But when I close it, it crashes. LogCat says " Runtime Exception : Fail to connect to camera service "! + hasFlash is not getting any value and is throwing Nullpointer exception.…
Tushar Gogna
  • 4,963
  • 6
  • 31
  • 42
0
votes
4 answers

Flash Light Not turn On?

I am an android developer , i want to on my mobile flashlight . I have Nexus5. My code is below.Any one can help me? Tell me what is missing here? I have set permissions, no error occred but not app works fine. Main Activity.Java import…
NadeemYousaf
  • 233
  • 1
  • 3
  • 12
0
votes
1 answer

How to stop a thread

I am using Thread to blink the flash light. It works great for first time when i click on blink button. Can any one tell me how to stop the blinking. Here is my code : blink.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener()…
0
votes
1 answer

Send compressed data over web socket (to Flash VNC application)

TL;DR: Sending "Deflate" compressed data to a client over a web socket causes issues that are hard to track down. Is sending "Deflate" compressed data over a web socket possible? I have an application that uses Flashlight VNC that has been updated…
binarygiant
  • 6,362
  • 10
  • 50
  • 73
0
votes
1 answer

Implementing strobe (Flash Light Blinking) effect on android which blinks with the same frequency

I am implementing strobe functionality which works fine ( the LED camera flash light turn on/off) the problem that i occurring is that the turn on/off with different frequency in different devices. In HTC SensationXE its blinking fast and in NEXUS…
Syed Raza Mehdi
  • 4,067
  • 1
  • 31
  • 47