camera-flash

UIImagePickerController custom FlashMode button is not working on IOS 10 (swift)

前提是你 提交于 2020-01-15 09:21:05
问题 I know that a question of this type is already asked but I Debugged it in bit detail, and i came to this point that when i switched this flag off self.picker.showsCameraControls = false then the custom flash button doesn't respond but if I'll change the flag to self.picker.showsCameraControls = true then my custom flash button responding OK, I have check all the delegates and flags but I am not able to pin point the bug, either it is in my code or it is in IOS 10 version, if its in my code

Why does flash drives app in stack? CONTROL_AE_MODE_ON_ALWAYS_FLASH Camera2API

人盡茶涼 提交于 2020-01-07 09:23:35
问题 There is weird situation. I took standard google sample camera2API. I need that flash is worked permanently, regardless of outside light. In order to accomplish it i have changed one line of code: private void setAutoFlash(CaptureRequest.Builder requestBuilder) { if (mFlashSupported) { // requestBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON_AUTO_FLASH); requestBuilder.set(CaptureRequest.CONTROL_AE_MODE, CaptureRequest.CONTROL_AE_MODE_ON_ALWAYS_FLASH); } } It

How to change color of Camera LED / Flashlight in Android

有些话、适合烂在心里 提交于 2019-12-24 00:07:57
问题 I'm trying to change color of Camera LED / Flashlight in Android. is their any way to achieve this ? I know we can change colors on Nexus One Track Ball. I'm trying to change Camera LED / Flashlight color in Android like that. 回答1: I'm trying to change color of Camera LED / Flashlight in Android. is their any way to achieve this ? Tape a piece of colored transparent plastic over the LED. I'm trying to change Camera LED / Flashlight color in Android like that. There is nothing in the Android

android : camera.getParameters() crashes app

人盡茶涼 提交于 2019-12-19 10:47:21
问题 i'm using this code to use the camera LED as flashlight but it crashes when the service starts. Using Log.w() statements i found it stops at param = camera.getParameters();. i have included the android.permission.CAMERA in my manifest. i don't understand what causes the crash. how can i fix this? public class Flashlight extends Service { private Camera camera; private Parameters param; private final IBinder mBinder = new LocalBinder(); public class LocalBinder extends Binder { Flashlight

Can I change the LED intensity of an Android device?

安稳与你 提交于 2019-12-17 05:54:07
问题 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 different intensities to the LED for a stronger light or to reduce the light intensity? 回答1: HTC has an alternative API that supports this, however it's only on HTC Sense devices, and as of Gingerbread they've changed the permissions so it's only for their

Can I change the LED intensity of an Android device?

ぃ、小莉子 提交于 2019-12-17 05:54:05
问题 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 different intensities to the LED for a stronger light or to reduce the light intensity? 回答1: HTC has an alternative API that supports this, however it's only on HTC Sense devices, and as of Gingerbread they've changed the permissions so it's only for their

Camera.Parameters.FLASH_MODE_ON is not working on Moto X

萝らか妹 提交于 2019-12-12 15:18:45
问题 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 parameters in the camera Camera.Parameters params = cameraInstance.getParameters(); List<Size> list = params.getSupportedPictureSizes(); Size s = list.get(0); for (Size size : list) { if (s.height < size.height) s = size; } params.setPictureSize(s.width, s

Camera2 api problems firing flash/no flash images

落花浮王杯 提交于 2019-12-11 06:32:50
问题 I will explain my case. I'm trying to do an application in which every 5 seconds will take an image, one without flash, and then after 5 seconds one with flash, and repeat this every time. So it will take one without flash, one with flash, one without flash, one with flash... infinitely. The case is that with my code I can do this in some devices, but the same code won't work in others as I want. i.e: BQ Aquaris X5 Plus : The no-flash image is correct, but the flash image will be just white.

Camera Flash Turn Auto/On/Off with UIImagePickerController in IOS - Swift

青春壹個敷衍的年華 提交于 2019-12-08 07:26:04
问题 I am very new to IOS Swift. But I am building a sample camera app that takes picture and video and then saved to photo gallery. But I want user to choose Auto/On/Off Flash option on the Camera View and when the user takes the picture then flash turns on or turns off depending on option what he/she chooses. I am using UIImagePickerController to customize camera features. I couldn't get much suggestions so far on how can I able to On/Off feature on the camera view and the camera flash works

Switch flash in Camera2 API

陌路散爱 提交于 2019-12-04 03:51:20
问题 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 https://github.com/googlesamples/android-Camera2Basic as a starting point. my method: private void captureStillPicture() { try { final Activity activity = (Activity) context; if (null == activity || null == mCameraDevice) { return; } // This is the CaptureRequest.Builder that we use to take a