PhotoMetadata

public abstract class PhotoMetadata implements Parcelable


The metadata corresponding to a single photo associated with a place.

Summary

Nested types

public abstract class PhotoMetadata.Builder

Builder for PhotoMetadata.

Public constructors

Public methods

static PhotoMetadata.Builder
builder(String photoReference)

Returns a Builder.

abstract String

Returns the attributions that must be shown to the user if this photo is displayed.

abstract @Nullable AuthorAttributions

Returns this photo's AuthorAttributions.

abstract @IntRange(from = 0) int

Returns the maximum height in which this photo is available.

abstract @IntRange(from = 0) int

Returns the maximum width in which this photo is available.

Inherited Constants

From android.os.Parcelable
static final int
static final int
static final int
static final int

Inherited methods

From android.os.Parcelable
abstract int
int
abstract void
writeToParcel(Parcel p, int p1)

Public constructors

PhotoMetadata

public PhotoMetadata()

Public methods

builder

public static PhotoMetadata.Builder builder(String photoReference)

Returns a Builder.

If the attributions value is not set, it default to an empty String.

If width or height values are not set, they default to 0.

Parameters
String photoReference

Non-empty String used to identify the underlying photo.

getAttributions

public abstract String getAttributions()

Returns the attributions that must be shown to the user if this photo is displayed.

See Displaying Attributions for more details.

Returns
String

The attributions in HTML format, or an empty String if there are none.

getAuthorAttributions

public abstract @Nullable AuthorAttributions getAuthorAttributions()

Returns this photo's AuthorAttributions.

The author attributions field is only supported by Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getHeight

public abstract @IntRange(from = 0) int getHeight()

Returns the maximum height in which this photo is available.

getWidth

public abstract @IntRange(from = 0) int getWidth()

Returns the maximum width in which this photo is available.