I have developed app that can toggle rear and front flashes. But if a device hasn't got front flash the app crashes. Can I check device front flash availability? Like if front flash unavailable show toast and disable the button.
Any help would be appreciated.
Something like this I guess:
boolean flashAvailable = cameraCharacteristics.get(cameraCharacteristics.FLASH_INFO_AVAILABLE);
public static final Key FLASH_INFO_AVAILABLE
Will be false if no flash is available.
If there is no flash unit, none of the flash controls do anything. This key is available on all devices.