Library for Android Camera 1 and 2 APIs. Massively increase stability and reliability of photo and video capture on all Android devices.
5.35k
stars
878
forks
source link
Flash not working on v1.0.0-beta3.11 #607
Open
gauravbhucamp opened 4 years ago
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
(Please include the following information along with any other relevant environment details.)
CameraKit Version: v1.0.0-beta3.11
Android Device: Pixel
Android Version: Android 10
Expected Behavior
binding!!.cameraView.flash = CameraKit.FLASH_ON binding!!.cameraView.flash = CameraKit.FLASH_OFF
these two methods switch on-off flash.
Actual Behavior
Nothing happens,
binding!!.cameraView.flash = CameraKit.FLASH_ON This method do nothing.
My Setup for using camera
//camera view for image implementation 'com.camerakit:camerakit:1.0.0-beta3.11' implementation 'com.camerakit:jpegkit:0.1.0'
binding!!.ivFlash.setOnClickListener{ if (binding!!.cameraView.flash == CameraKit.FLASH_OFF) { binding!!.cameraView.flash = CameraKit.FLASH_ON binding!!.ivFlash.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_flash_on)) } else { binding!!.cameraView.flash = CameraKit.FLASH_OFF binding!!.ivFlash.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_flash_off)) } }