> Documentation index: https://developer.android.com/reference/llms.txt

# UriOnlyBitmapLoader

Artifact: [androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/FakeBitmapLoader.kt+class:androidx.media3.test.utils.UriOnlyBitmapLoader)

*** ** * ** ***


```
@UnstableApi
public fun interface UriOnlyBitmapLoader extends BitmapLoader
```

<br />

*** ** * ** ***

A `BitmapLoader` that only implements `loadBitmap`, supporting all MIME types and throwing `UnsupportedOperationException` from `decodeBitmap`.

## Summary

| ### Public methods |
|---|---|
| `default @NonNull ListenableFuture<@NonNull Bitmap>` | `decodeBitmap(@NonNull byte[] data)` Decodes an image from compressed binary data. |
| `default boolean` | `supportsMimeType(@NonNull String mimeType)` Returns whether the given `mimeType` is supported. |

### Inherited methods

From [androidx.media3.common.util.BitmapLoader](https://developer.android.com/reference/androidx/media3/common/util/BitmapLoader.md.txt) `abstract @NonNull ListenableFuture<@NonNull Bitmap>` `loadBitmap(@NonNull Uri uri)`

Loads an image from `uri`.
`default @Nullable ListenableFuture<@NonNull Bitmap>` `loadBitmapFromMetadata(@NonNull MediaMetadata metadata)`

Loads an image from `MediaMetadata`.

## Public methods

### decodeBitmap

```
default @NonNull ListenableFuture<@NonNull Bitmap> decodeBitmap(@NonNull byte[] data)
```

Decodes an image from compressed binary data.

### supportsMimeType

```
default boolean supportsMimeType(@NonNull String mimeType)
```

Returns whether the given `mimeType` is supported.