get Camera Max Preview Fps Range - Android android.hardware

Android examples for android.hardware:Camera Preview

Description

get Camera Max Preview Fps Range

Demo Code

import java.util.List;

import android.hardware.Camera.Parameters;

public class Main {

  public static int[] getMaxPreviewFpsRange(Parameters params) {
    List<int[]> frameRates = params.getSupportedPreviewFpsRange();
    if (frameRates != null && frameRates.size() > 0) {
      // The list is sorted. Return the last element.
      return frameRates.get(frameRates.size() - 1);
    }//from  w  w  w .  jav  a 2 s  .c o m
    return new int[0];
  }

}

Related Tutorials