Closed jqn closed 6 years ago
@avshenuk correct me if I'm wrong but if FLASH_MODE_TORCH isn't available there is already a logic handling this case in CameraSource.java line 840.
if (mFlashMode != null) {
if (parameters.getSupportedFlashModes() != null) {
if (parameters.getSupportedFlashModes().contains(
mFlashMode)) {
parameters.setFlashMode(mFlashMode);
} else {
Log.i(TAG, "Camera flash mode: " + mFlashMode + " is not supported on this device.");
}
}
}
and setting the flash mode to ON doesn't act like torch mode anyways since it is not continuously enabled. For that I believe we would need to add a flashmode property.
hey this pr what implmented is working??
@TheCodeTalker it is working just not getting a lot of traction with the repo owner to merge it.
@ekreutz FLASH not working i have tested with android phone
@ekreutz could you please look into merging this pull request. This is the torch mode implementation only, I've removed everything else. The original author of this pull request doesn't seem to be active and it would be really useful to have this functionality included in this package.