# FallbackStrategy

Artifact: [androidx.camera:camera-video](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/video/FallbackStrategy.java+class:androidx.camera.video.FallbackStrategy) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

*** ** * ** ***


```
public class FallbackStrategy
```

<br />

*** ** * ** ***

A class represents the strategy that will be adopted when the device does not support all the desired `https://developer.android.com/reference/androidx/camera/video/Quality` in `https://developer.android.com/reference/androidx/camera/video/QualitySelector` in order to select the quality as possible.

## Summary

| ### Public methods |
|---|---|
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/video/FallbackStrategy` | `https://developer.android.com/reference/androidx/camera/video/FallbackStrategy#higherQualityOrLowerThan(androidx.camera.video.Quality)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/video/Quality quality)` Returns a fallback strategy that will choose the quality that is closest to and higher than the input quality. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/video/FallbackStrategy` | `https://developer.android.com/reference/androidx/camera/video/FallbackStrategy#higherQualityThan(androidx.camera.video.Quality)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/video/Quality quality)` Returns a fallback strategy that will choose the quality that is closest to and higher than the input quality. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/video/FallbackStrategy` | `https://developer.android.com/reference/androidx/camera/video/FallbackStrategy#lowerQualityOrHigherThan(androidx.camera.video.Quality)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/video/Quality quality)` Returns a fallback strategy that will choose the quality that is closest to and lower than the input quality. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/video/FallbackStrategy` | `https://developer.android.com/reference/androidx/camera/video/FallbackStrategy#lowerQualityThan(androidx.camera.video.Quality)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/androidx/camera/video/Quality quality)` Returns a fallback strategy that will choose the quality that is closest to and lower than the input quality. |

## Public methods

### higherQualityOrLowerThan

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

```
public static @NonNull FallbackStrategy higherQualityOrLowerThan(@NonNull Quality quality)
```

Returns a fallback strategy that will choose the quality that is closest to and higher than the input quality.

If that can not result in a supported quality, choose the quality that is closest to and lower than the input quality.

### higherQualityThan

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

```
public static @NonNull FallbackStrategy higherQualityThan(@NonNull Quality quality)
```

Returns a fallback strategy that will choose the quality that is closest to and higher than the input quality.

### lowerQualityOrHigherThan

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

```
public static @NonNull FallbackStrategy lowerQualityOrHigherThan(@NonNull Quality quality)
```

Returns a fallback strategy that will choose the quality that is closest to and lower than the input quality.

If that can not result in a supported quality, choose the quality that is closest to and higher than the input quality.

### lowerQualityThan

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

```
public static @NonNull FallbackStrategy lowerQualityThan(@NonNull Quality quality)
```

Returns a fallback strategy that will choose the quality that is closest to and lower than the input quality.