# Mp4LocationData

Artifact: [androidx.media3:media3-container](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/container/Mp4LocationData.java+class:androidx.media3.container.Mp4LocationData)

*** ** * ** ***


```
@UnstableApi
public final class Mp4LocationData implements Metadata.Entry
```

<br />

*** ** * ** ***

Stores MP4 location data.

The location data is typically read/written in the "udta" box (user data box, defined in ISO/IEC 14496-12).

## Summary

| ### Constants |
|---|---|
| `static final float` | `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#ALTITUDE_UNSET() = -3.4028235E38f` Represents an unset or unknown altitude. |

| ### Public fields |
|---|---|
| `final float` | `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#altitude()` The altitude, in meters, or `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#ALTITUDE_UNSET()` if unset. |
| `final float` | `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#latitude()` The latitude, in degrees. |
| `final float` | `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#longitude()` The longitude, in degrees. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#Mp4LocationData(float,float)( @https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-90.0", to = 90.0) float latitude, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-180.0", to = 180.0) float longitude )` Creates an instance with latitude and longitude only. |
| `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#Mp4LocationData(float,float,float)( @https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-90.0", to = 90.0) float latitude, @https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-180.0", to = 180.0) float longitude, float altitude )` Creates an instance with latitude, longitude, and altitude. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html obj)` |
| `int` | `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#hashCode()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#toString()()` |

### Inherited methods

From [androidx.media3.common.Metadata.Entry](https://developer.android.com/reference/androidx/media3/common/Metadata.Entry) `@https://developer.android.com/reference/androidx/annotation/Nullable byte[]` `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()()`

Returns the bytes of the wrapped metadata in this Entry, or null if it doesn't contain wrapped metadata.
`@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Format` `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataFormat()()`

Returns the `https://developer.android.com/reference/androidx/media3/common/Format` that can be used to decode the wrapped metadata in `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#getWrappedMetadataBytes()`, or null if this Entry doesn't contain wrapped metadata.
`void` `https://developer.android.com/reference/androidx/media3/common/Metadata.Entry#populateMediaMetadata(androidx.media3.common.MediaMetadata.Builder)(https://developer.android.com/reference/androidx/media3/common/MediaMetadata.Builder builder)`

Updates the `https://developer.android.com/reference/androidx/media3/common/MediaMetadata.Builder` with the type-specific values stored in this `
Entry`.

## Constants

### ALTITUDE_UNSET

```
public static final float ALTITUDE_UNSET = -3.4028235E38f
```

Represents an unset or unknown altitude.

## Public fields

### altitude

```
public final float altitude
```

The altitude, in meters, or `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#ALTITUDE_UNSET()` if unset.

### latitude

```
public final float latitude
```

The latitude, in degrees.

### longitude

```
public final float longitude
```

The longitude, in degrees.

## Public constructors

### Mp4LocationData

```
public Mp4LocationData(
    @FloatRange(from = "-90.0", to = 90.0) float latitude,
    @FloatRange(from = "-180.0", to = 180.0) float longitude
)
```

Creates an instance with latitude and longitude only.

The `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#altitude()` is set to `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#ALTITUDE_UNSET()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-90.0", to = 90.0) float latitude` | The latitude, in degrees. Its value must be in the range \[-90, 90\]. |
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-180.0", to = 180.0) float longitude` | The longitude, in degrees. Its value must be in the range \[-180, 180\]. |

### Mp4LocationData

```
public Mp4LocationData(
    @FloatRange(from = "-90.0", to = 90.0) float latitude,
    @FloatRange(from = "-180.0", to = 180.0) float longitude,
    float altitude
)
```

Creates an instance with latitude, longitude, and altitude.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-90.0", to = 90.0) float latitude` | The latitude, in degrees. Its value must be in the range \[-90, 90\]. |
| `@https://developer.android.com/reference/androidx/annotation/FloatRange(from = "-180.0", to = 180.0) float longitude` | The longitude, in degrees. Its value must be in the range \[-180, 180\]. |
| `float altitude` | The altitude, in meters, or `https://developer.android.com/reference/androidx/media3/container/Mp4LocationData#ALTITUDE_UNSET()` if unset. |

## Public methods

### equals

```
public boolean equals(@Nullable Object obj)
```

### hashCode

```
public int hashCode()
```

### toString

```
public String toString()
```