public interface

PlacePhotoMetadata

implements Freezable<PlacePhotoMetadata>
com.google.android.gms.location.places.PlacePhotoMetadata

Class Overview

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

Summary

Public Methods
abstract CharSequence getAttributions()
Returns the attributions that must be shown to the user if this photo is displayed.
abstract int getMaxHeight()
Returns the maximum height in which this photo is available.
abstract int getMaxWidth()
Returns the maximum width in which this photo is available.
abstract PendingResult<PlacePhotoResult> getPhoto(GoogleApiClient client)
Retrieves the image data for this photo at its maximum size.
abstract PendingResult<PlacePhotoResult> getScaledPhoto(GoogleApiClient client, int width, int height)
Retrieves the image data for this photo, scaled to fit the given dimensions.
[Expand]
Inherited Methods
From interface com.google.android.gms.common.data.Freezable

Public Methods

public abstract CharSequence getAttributions ()

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

See Displaying Attributions for more details.

Returns
CharSequence The attributions in HTML format, or null if there are none.

public abstract int getMaxHeight ()

Returns the maximum height in which this photo is available.

Returns
int The maximum height in pixels.

public abstract int getMaxWidth ()

Returns the maximum width in which this photo is available.

Returns
int The maximum width in pixels.

public abstract PendingResult<PlacePhotoResult> getPhoto (GoogleApiClient client)

Retrieves the image data for this photo at its maximum size.

The photos service may cache the image data. If the requested photo does not exist in the cache then a network lookup will be performed.

Access to this method is subject to quota restrictions. See Usage Limits for more details.

Parameters
client GoogleApiClient
Returns
PendingResult<PlacePhotoResult> A PendingResult including the result of the request and (if successful) a Bitmap of the image data.

public abstract PendingResult<PlacePhotoResult> getScaledPhoto (GoogleApiClient client, int width, int height)

Retrieves the image data for this photo, scaled to fit the given dimensions.

The image will be scaled to match the smaller of the given dimensions whilst maintaining the original aspect ratio. This scaling is performed server-side.

The photos service may cache the image data. If the requested photo does not exist in the cache then a network lookup will be performed.

Access to this method is subject to quota restrictions. See Usage Limits for more details.

Parameters
client GoogleApiClient
width int: The desired maximum width in pixels.
height int: The desired maximum height in pixels.
Returns
PendingResult<PlacePhotoResult> A PendingResult including the result of the request and (if successful) a Bitmap of the image data.
Throws
IllegalArgumentException If either of the given width or height values are less than or equal to 0.