How to know maximum supported fps by android device on API level?
<p>While googling, I've got <a href="https://github.com/Samsung/GearVRf/issues/270" rel="nofollow">this information</a> that if I want to enable my camera to record high frame rate video on android device, I need to put specific parameters by device vendor for calling camera APIs.</p>

<p>For example, by calling the methods as below, I could enable my Galaxy S6 camera app recording 120 fps constantly.</p>

<pre><code>camera = Camera.open();
Camera.Parameters parms = camera.getParameters();

// for 120fps
parms.set("fast-fps-mode", 2); // 2 for 120fps
parms.setPreviewFpsRange(120000, 120000);
</code></pre>

<p>But the problem is no all devices(including LG, and other vendors) support 120 fps(or higher). So I need to know maximum fps in API level in real-time when run my camera app for error handling.</p>

<p>In my case, <a href="http://developer.android.com/intl/ko/reference/android/hardware/Camera.Parameters.html#getSupportedPreviewFpsRange()" rel="nofollow">Camera.Parameters.getSupportedPreviewFpsRange()</a> not worked for me. 
It only returns maximum 30000(meaning 30fps) even it could record at 120000(120 fps). I think it because recording at high frame rate(more than 30 fps) is strongly related with camera hardware property and that's why I need to call vendor specific APIs.</p>

<p>Is there a common way to get maximum fps by camera device in API level?</p>

<p>---------------------- EDIT ----------------------</p>

<p>On API21(LOLLIPOP), we could use StreamConfigurationMap to get maximum value for high speed fps recording. The usage is as below.</p>

<pre><code>CameraManager manager = (CameraManager)activity.getSystemService(Context.CAMERA_SERVICE);
String cameraId = manager.getCameraIdList()[0];
CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId);
StreamConfigurationMap map = characteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
Range&lt;Integer&gt;[] fpsRange = map.getHighSpeedVideoFpsRanges(); // this range intends available fps range of device's camera.
</code></pre>