NoobCameraFlash icon indicating copy to clipboard operation
NoobCameraFlash copied to clipboard

Update CameraUtilICS.java

Open rcaboni opened this issue 8 years ago • 3 comments

There is a little bug for "old" Android (before 5). I add startPreview and stopPreview to fix it. I try it on Samsung S4 Mini (Android 4.4.4)

rcaboni avatar Feb 23 '17 11:02 rcaboni

@rcaboni Thanks for the fix, but can you please provide some more details about the bug, so that I can test it and check whether it exists on other devices. I also need the details to know whether the fix will affect apps in other Android versions or not.

Abhi347 avatar Feb 27 '17 16:02 Abhi347

Hi Abhi, the problem is only for Android before LOLLIPOP, indeed i fix the CameraUtilICS file. The bug is that the only setTorchMode(TorchMode.SwitchedOn); is not enough to turn on the flash but it's essential to call mCamera.startPreview(); too. Without this the flash don't turn on. The same fix for turn off the flash.

I check the problem and the fix it on Samsung S3 Mini, S4 Mini, XCover 2. Before the fix the flash don't turn on in these devices with Android 4.x. i notice your library that work on all Android version, but without this fix we spoil "old" Android version (still an important piece of market ).

rcaboni avatar Feb 28 '17 07:02 rcaboni

noobCameraManager.init(getActivity(), LogLevel.Verbose);

it was getActivity() not working MainActivity

Changsik00 avatar Jul 04 '17 12:07 Changsik00