# ZoomSuggestionOptions.Builder

public static class **ZoomSuggestionOptions.Builder** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
Builder to build out a `https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions`.

### Public Constructor Summary

|---|---|
|   | [Builder](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions.Builder#Builder(com.google.mlkit.vision.barcode.ZoomSuggestionOptions.ZoomCallback))([ZoomSuggestionOptions.ZoomCallback](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions.ZoomCallback) zoomCallback) Builder for `https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions`. |

### Public Method Summary

|---|---|
| [ZoomSuggestionOptions](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions) | [build](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions.Builder#build())() Builds a `https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions` instance. |
| [ZoomSuggestionOptions.Builder](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions.Builder) | [setMaxSupportedZoomRatio](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions.Builder#setMaxSupportedZoomRatio(float))(float maxSupportedZoomRatio) Sets the max supported zoom ratio. |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

## Public Constructors

#### public **Builder** ([ZoomSuggestionOptions.ZoomCallback](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions.ZoomCallback) zoomCallback)

Builder for `https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions`.

##### Parameters

| zoomCallback | The `https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions.ZoomCallback` to zoom the camera. |
|---|---|

## Public Methods

#### public [ZoomSuggestionOptions](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions)
**build** ()

Builds a `https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions`
instance.

#### public [ZoomSuggestionOptions.Builder](https://developers.google.com/android/reference/com/google/mlkit/vision/barcode/ZoomSuggestionOptions.Builder)
**setMaxSupportedZoomRatio** (float maxSupportedZoomRatio)

Sets the max supported zoom ratio.

Different camera libraries have different ways to fetch the max supported zoom
ratio.

- Camera1: camera.getZoomRatios(camera.getMaxZoom())
- Camera2: characteristics.get(CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM)
- CameraX: camera.getCameraInfo().getZoomState().getValue().getMaxZoomRatio()

If unset, then the library may produce an unbounded zoom ratio.

##### Parameters

| maxSupportedZoomRatio | the max supported zoom ratio fetched from camera. |
|---|---|

##### Returns

- this object, for chaining method calls.