set Camera Antibanding - Android android.hardware

Android examples for android.hardware:Camera Feature

Description

set Camera Antibanding

Demo Code

import java.util.List;

import android.hardware.Camera.Parameters;

public class Main {

  public static void setAntibanding(Parameters params, String value) {
    List<String> supported = params.getSupportedAntibanding();
    String supportedValue = getSupportedValue(supported, value);
    if (supportedValue == null) {
      return;/*from  w w w. j a  v a  2s  .  co  m*/
    }
    params.setAntibanding(supportedValue);
  }

  private static String getSupportedValue(List<String> supported, String value) {
    return (supported != null) && supported.contains(value) ? value : null;
  }

}

Related Tutorials