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
4
votes
3 answers

what is the difference between FLASH_MODE_TORCH AND FLASH_MODE_ON

My app turn on camera LED using FLASH_MODE_TORCH, but now some people say that FLASH_MODE_TORCH will not work on some Samsung devices correctly. So should I use FLASH_MODE_ON for all devices to work?(especially for Samsung devices)
Mehrdad Salimi
  • 1,400
  • 4
  • 16
  • 31
4
votes
2 answers

Flash Torch on Google Nexus 5

after reading all the posts of the other users with the same problem I was able to create a simple working app for turning on flash light on my Nexus 5, this is the "OnCreate()" method: @Override protected void onCreate(Bundle savedInstanceState) { …
user3455333
  • 43
  • 1
  • 4
4
votes
3 answers

Opening flashlight in android with different modes

Will the code as below work on android devices like Motorola razor who doesn't support torch? Can someone please be kind enough to test if has any phone like that and please tell me. Thanks in advance!! if (!isFlashOn) { if (camera…
We're All Mad Here
  • 1,544
  • 3
  • 18
  • 46
4
votes
1 answer

Windows Phone 8 can´t call AudioVideoCaptureDevice second time

In my App you can open a Site where you can switch on and off the Flashlight. The first time it works, but if I try to switch the flashlight on a second time the App crashes. I think this is a Problem with AudioVideoCaptureDevice.OpenAsync. If I…
user2127925
  • 67
  • 1
  • 7
4
votes
1 answer

Keeping Camera Alive While Paused

I have a flashlight app, and if the app is paused, the camera is released. Be it the home button or power button. I want the camera to stay alive when either of these are pressed and released when I close the app completely. How do I go about doing…
Pazuzu156
  • 679
  • 6
  • 13
3
votes
1 answer

Is there any possibility to control the iphone's/android's flashlight through as3?

Just that: is there any possibility to control the iPhone's flashlight using any class in ActionScript 3? Thanks in advance, DGM.-
DGM.-
  • 151
  • 3
  • 13
3
votes
4 answers

app hanging on camera.release()

I'm working on a flashlight app using the camera flash. It seems to work fine but on occasion calling camera.release() causes a hang for about a minute or so. I've included the code below. I've looked at a bunch of examples and I don't see anything…
3
votes
2 answers

What method is called after 'applicationDidBecomeActive'?

it's my first question here as I have a problem developing my first iOS app. It is one of the thousands of flashlight apps, however I'm trying to put as many features as possible to it. One of them is saving the state of the app when it goes to…
Bartek Eborn
  • 524
  • 5
  • 12
3
votes
1 answer

Torch/Flash flickers once before staying on

I am using code (which I used before XCode 4 in another project) and now if I switch my flashlight on, it flashes once before it stays on. Like so: -*-**** where -=off & *=on The code I am using: AVCaptureDevice *device = [AVCaptureDevice…
Pangolin
  • 7,284
  • 8
  • 53
  • 67
3
votes
0 answers

Getting Access denied finding property "vendor.camera.aux.packagelist" ERROR unsing Flashlight

In my application I am using the Smartphone's flash light when a Notification arrives. When a new Push notification arrives the following function gets executed. private static void flashlight(final Context context, final String userId) { if…
3
votes
2 answers

How to turn on the torch/flashlight with GooglePlay Services Vision API Xamarin Android

I have been trying to implement the flashlight/torch feature of the camera using the GooglePlay Services Vision API (using Nuget from Visual Studio) for the past few days without success. I have noticed that there is a GitHub implementation of this…
Gustavo Baiocchi Costa
  • 1,379
  • 3
  • 16
  • 34
3
votes
1 answer

Flash not being turned off on button press(Flashlight App)

I have 3 buttons on the UI. On, Off and SOS(flash at repeated intervals). If I press On and then the Off button the flash turns off as expected.But if I press SOS(it flashes as expected at regular intervals) and then Off it refuses to stop flashing.…
Anurag Joshi
  • 300
  • 1
  • 12
3
votes
0 answers

How to use flashlight/torch with Google Vision barcode reader API?

I have a similar question to this question and this question, neither of which have an accepted solution. I'm basically using the Google Vision barcode API but there appears no obvious way to control the flashlight. This answer suggests using this…
3
votes
1 answer

Trying to create flashlight with Android Camera2

I am trying to create a flashlight using Camera2. I am getting errors. When I am trying to turn on or off flashlight I get the error message: android.hardware.camera2.CameraAccessExeption: The camera device has encountered a serious…
Solo
  • 569
  • 1
  • 7
  • 27
3
votes
2 answers

Toggle Flashlight in Camera2 without Interrupting Preview

Just started using the Camera2 framework because of the increased control it provides over the low-level functions of the camera. However, I am having some trouble turning the flashlight on and off quickly. With the old Camera API, I could toggle…