0

Is any solution to put some parameter to Intent(MediaStore.ACTION_IMAGE_CAPTURE) that would take photo with flash as default parameter?

sumandas
  • 547
  • 6
  • 19

2 Answers2

3

There is no Intent extra to allow you to control the flash mode for ACTION_IMAGE_CAPTURE. Even if there were, not all camera apps would honor it.

CommonsWare
  • 954,112
  • 185
  • 2,315
  • 2,367
-1

To check if the Android device has a flash available, you can do this simple check :

context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH);

This check will return true if there's a flash available on the device or false if it doesn't.

Read more about : FEATURE_CAMERA_FLASH

Also after doing quite a bit of digging on Camera intent, turns out the only extra parameter you could use is :

MediaStore.EXTRA_OUTPUT

Reference : Intent does not set the camera parameters

Community
  • 1
  • 1
RamithDR
  • 1,843
  • 2
  • 22
  • 32