问题
I am trying to get supported shutter speed parameters but I am now sure how to get those ranges.
For ISO-values
String supportedIsoValues = camParams.get("iso-values"); //supported values, comma separated String System.out.println("supportedIsoValues: " + supportedIsoValues);
But I have no idea how to get supported shutter speed. How can I get a supported shutter speed?
回答1:
Lets start with Camera from Android Devs. They tell us that starting with API 21 you should move over to android.hardware.camera2. There is a lot you can ask from a camera, it seems. Very informative, but not the answer you are looking for.
This stackoverflow post's answer has the answer(s) you want.
To be complete, here is PkmX's lcamera's example for the kind of codes you are looking for.
回答2:
Even "iso-values" is not part of the standard Android camera API - it's a (common) vendor extension, and can't be relied on to be present.
There's no official support for either ISO or exposure time control in the old, deprecated camera API. You need to move to camera2 for that, and check that the device supports capability MANUAL_SENSOR.
Then you can disable AE, and manually control exposure time, frame duration, and ISO sensitivity.
来源:https://stackoverflow.com/questions/40300124/android-5-x-shutter-speed