duanhong169 / Camera

📸 Use Android camera to take pictures and videos, based on `camera2` api.
Apache License 2.0
130 stars 45 forks source link

flash not working after recording start #15

Open pankrawat844 opened 4 years ago

pankrawat844 commented 4 years ago

when i start flash then click on recording then flash is closed, why this happend. Anybody help me

mashtyyy commented 3 years ago

hi I solved by this just add below code to the end of onStartRecording() function

` int flash = photographer.getFlash(); if (flash == Values.FLASH_TORCH) { photographer.setFlash(Values.FLASH_OFF);

                new Handler().postDelayed(new Runnable() {
                    @Override
                    public void run() {
                        photographer.setFlash(Values.FLASH_TORCH);
                    }
                },100);
            }`
rishu404 commented 2 years ago

Hi @mashtyyy

Are you getting a blink after starting the recording by the solution you gave above?

anilchahalaig commented 1 year ago

I am also facing the flash issue, any resolution folks?