Questions tagged [camera-flash]

55 questions
37
votes
5 answers

Can I change the LED intensity of an Android device?

Is there a way to set the LED intensity that I desire? I know that to turn on the LED I use: p.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH); mycam.setParameters(p); But this code just turns on the LED. But is there a way to set…
Buda Gavril
  • 19,769
  • 35
  • 114
  • 174
8
votes
3 answers

Accessing AutoFocus/Flash with Google Vision BarCode Reader

I am playing with the original example of BarCode scanner…
Vojtěch
  • 9,438
  • 25
  • 81
  • 138
6
votes
3 answers

Android Camera2 API Flash doesnt work on galaxy devices

I am using the Android Camera2 API to take photos for an app and I can't get the flash to work properly on most Samsung Galaxy devices (galaxy s6 edge, galaxy s7, galaxy j7). I believe I have implemented the flash logic properly because Google's…
Jordan
  • 89
  • 1
  • 5
6
votes
2 answers

Option like SOSModule didn't work

I am trying create option like SOS Module in my app, I create code to handle this: class SOSModule { private Camera camera; private Camera.Parameters params; private boolean isFlashOn; void blink(final int delay, final int times) { Thread t =…
Rodriquez
  • 861
  • 1
  • 7
  • 18
5
votes
1 answer

set AVCaptureTorchModeOn

I want to turn on torch mode AVCaptureTorchModeOn in my app while doing video recording. I m using below code. -(void)set_TorchMode:(BOOL)turnOn { AVCaptureDevice *theDevice = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; if…
Nikunj
  • 991
  • 10
  • 25
4
votes
1 answer

Switch flash in Camera2 API

My problem is when I switch between different flashmodes and then want to capture an image, my captureBuilder won't set the chosen flashmode. It only works when i close and reopen the camera. I took the…
Maxi
  • 892
  • 9
  • 15
4
votes
1 answer

How do I use AVCaptureFlashMode

I'm making an app to allow me to stitch images together into a panoramic scene. I want to be able to turn the Flash LED on the iPhone 4 programatically. How can I do this? I read the documentation and discovered that I need to use…
Cocoa Dev
  • 8,655
  • 29
  • 105
  • 173
4
votes
0 answers

FLASH_MODE_AUTO not working in Android on Samsung Note III

android : FLASH_MODE_AUTO not working for camera on Samsung note III Android 4.4.2 I have added permission AndroidManifest.xml
Amol Naik
  • 41
  • 1
3
votes
1 answer

Keep torch on while taking video iOS swift

I built a camera app for auto capture. I want to keep the flash on as long as the camera is on. I set the following code : cameraDevice = AVCaptureDevice.defaultDevice(withMediaType: AVMediaTypeVideo) if (cameraDevice.hasTorch) { do { …
Rubaiyat Jahan Mumu
  • 2,741
  • 1
  • 25
  • 32
3
votes
5 answers

iOS 10 Camera flash ON/OFF not working

Up to iOS 9 flash on / off / auto working fine. But in iOS 10 flash is not working. self.camObj = [[UIImagePickerController alloc] init]; [self addCameraToTheScreen]; NSArray *mediaTypes = [NSArray…
Thukaram
  • 1,065
  • 1
  • 12
  • 32
3
votes
1 answer

How can I tell if the flash hardware is open on my android camera?

I am developing an app for the Samsung Galaxy Camera 2. Unlike most android devices, this device has a hardware button to open and close the camera's flash. I would like the app to tell the user to open the flash before they take a picture, if the…
3
votes
2 answers

Camera.Parameters.FLASH_MODE_ON is not working on Moto X

I m testing my app on moto x and even after setting flash mode on, flash is not working. App is working fine in other devices but not on Moto X. here is a code snippet cameraInstance = getCameraInstance(cameraId); // Setting the right…
2
votes
0 answers

I cannot turn ON/OFF flash Barcode Detection in Google Play services?

I tried to turn on and turn off the flash when I use the camera with Barcode Detection in Google Play services, in several problems they say that the solution is setFashMode method of the class CameraSource but I did not find this…
dev21
  • 31
  • 2
2
votes
1 answer

Flash doesn't work while recording Video in Swift 3.0

I am working on a Camera App. I have used a button to set flash mode on and off when required. This method works perfectly for Capturing still image and is not working for Video mode. Below is my code please help. TIA class func setFlashMode(_…
iDeveloper
  • 740
  • 8
  • 42
2
votes
0 answers

Why when I tern flash light on my app go to stack?

I work with camera 2 API to carry out my custom camera according google sample but with some additions that my app requires. All was good until I added permanent support of flash light protected final void setAutoFlash(CaptureRequest.Builder…
Aleksey Timoshchenko
  • 3,364
  • 1
  • 33
  • 61
1
2 3 4