Search code examples
javaandroidandroid-intentcamera

How to open the default camera app in professional mode using an intent in your android app?


Camera app in devices provide a professional mode that lets users change iso, shutter speed etc. But when I open the app using the following code, the option for professional mode is missing-

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
try {
    startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
} catch (ActivityNotFoundException e) {
    Toast.makeText(this, "Could not access camera", Toast.LENGTH_LONG).show();
}

Could someone suggest what to do?


Solution

  • But, when the camera app is opened, the option for professional mode is missing

    I believe the current API does not support direct use of your camera modes. However, you can try Camera.getParameters() to see what parameters are available to tweak or try to use the methods listed in Camera.Parameters to match the camera modes required. All you need to understand is how the pro modes function. For example, on a normal camera, Shutter Speed is the rate of which the shutter is open and close to allow the light hit the sensor. Unlike cameras, phones do not have this but simply reflected as the time required to allow the lens to be activated. Try to do a bit of research like here Phone Pro Mode and match with the methods in the API. As a side note, latest cameras like Huawei Mate Pro they have their own sets of program built in and are not available for third party or developers personal use.

    Further, I don't mind using any library that provides me with the necessary UI for ISO, shutter speed etc. I just don't wish to code all that myself

    Sorry but I don't seem to be able to find any third party library that does this. Perhaps you should give these cool camera apps like ProCam X, Camera FV-5 or HedgeCam 2 a shot.