Place

public abstract class Place implements Parcelable


Represents a particular physical place.

A Place encapsulates information about a physical location, including its name, address, and any other information we might have about it.

Note: In general, some fields will be inapplicable to certain places, or the information may not exist.

Summary

Nested types

Value of the place attribute field.

public abstract class Place.Builder

Builder for Place.

public enum Place.BusinessStatus implements Parcelable

The business status of a place.

public enum Place.Field implements Parcelable

Use the values of Place.Field to specify which place data types to return.

public enum Place.Type implements Parcelable

This enum is deprecated.

Use getPlaceTypes instead.

Constants

static final int

The highest price level possible, for example, very expensive.

static final int

The lowest price level possible.

static final double

The highest rating possible, for example, very good.

static final double

The lowest rating possible, for example, very bad.

Public constructors

Public methods

static Place.Builder

Returns a Builder.

abstract @Nullable AccessibilityOptions

Returns the AccessibilityOptions a place offers.

abstract @Nullable String

This method is deprecated.

Use getFormattedAddress instead.

abstract @Nullable AddressComponents

Returns the address components for this Place's location.

abstract @Nullable String

Returns the place's address in adr microformat.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place allows dogs.

abstract @Nullable List<String>

Returns the attributions that must be shown to the user, if data from the Place is used.

abstract @Nullable Place.BusinessStatus

Returns the BusinessStatus for this Place.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for curbside pickup.

abstract @Nullable OpeningHours

Returns this Place's hours of operation over the next seven days.

abstract @Nullable List<OpeningHours>

Returns this Place's secondary hours of operation(s) over the next seven days.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for delivery.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for indoor or outdoor seating options.

abstract @Nullable String

Returns the display name of this Place.

abstract @Nullable String

Returns the display name's language code, if available.

abstract @Nullable String

Returns a medium-length (150 characters max) textual summary of the place.

abstract @Nullable String

Returns the editorial summary's language code, if available.

abstract @Nullable EVChargeOptions

Returns the EVChargeOptions a place offers.

abstract @Nullable String

Returns a full, human-readable address for this place.

abstract @Nullable FuelOptions

Returns the FuelOptions a place offers.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place is good for children.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place is good for groups.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place is good for watching sports.

abstract @Nullable Uri

Returns a URI providing more information about this place.

abstract @Nullable @ColorInt Integer

Returns the @ColorInt of the icon background color.

abstract @Nullable String

Returns the icon mask PNG URL string to the Places's type.

abstract @Nullable String

This method is deprecated.

Use getIconMaskUrl instead.

abstract @Nullable String

Returns the unique ID of this Place.

abstract @Nullable String

Returns the place's phone number in international format.

abstract @Nullable LatLng

This method is deprecated.

Use getLocation instead.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place provides live music.

abstract @Nullable LatLng

Returns the location of this Place.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place provides menu for children.

abstract @Nullable String

This method is deprecated.

Use getDisplayName instead.

abstract @Nullable String

This method is deprecated.

Use getDisplayNameLanguageCode instead.

abstract @Nullable String

Returns the place's phone number in national format.

abstract @Nullable OpeningHours

Returns this Place's normal business hours.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place provides outdoor seating.

abstract @Nullable ParkingOptions

Returns the ParkingOptions a place offers.

abstract @Nullable PaymentOptions

Returns the PaymentOptions a place offers.

abstract @Nullable String

This method is deprecated.

Use getInternationalPhoneNumber instead.

abstract @Nullable List<PhotoMetadata>

Returns the metadata for a photo associated with a place.

abstract @Nullable List<String>

Returns a list of place types for this Place.

abstract @Nullable PlusCode

Returns the PlusCode location of this Place.

abstract @Nullable @IntRange(from = 0, to = 4) Integer

Returns the price level for this place, on a scale from PRICE_LEVEL_MIN_VALUE to PRICE_LEVEL_MAX_VALUE.

abstract @Nullable String

Returns the primary place type for this Place.

abstract @Nullable String

Returns the display name of primary place type for this Place, if available.

abstract @Nullable String

Returns the primary type display name's language code, if available.

abstract @Nullable @FloatRange(from = 1.0, to = 5.0) Double

Returns the place's rating, from RATING_MIN_VALUE to RATING_MAX_VALUE, based on aggregated user reviews.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for reservations.

abstract @Nullable String

Returns the unique resource name of this Place.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place provides restroom.

abstract @Nullable List<Review>

Returns up to five reviews associated with a place.

abstract @Nullable List<OpeningHours>

Returns this Place's secondary hours of operation(s).

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for serving beer.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for serving breakfast.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for serving brunch.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place serves cocktails.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place serves coffee.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue if a place serves dessert.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for serving dinner.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for serving lunch.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for serving vegetarian food.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for serving wine.

abstract @Nullable String

Returns a short, human-readable address for this place.

abstract @Nullable List<SubDestination>

Returns a list of sub-destinations related to the place.

abstract Place.BooleanPlaceAttributeValue

Returns the BooleanPlaceAttributeValue for takeout service.

abstract @Nullable List<Place.Type>

This method is deprecated.

Use getPlaceTypes instead.

abstract @Nullable @IntRange(from = 0) Integer

Returns the total number of user ratings of this Place.

abstract @Nullable @IntRange(from = 0) Integer

This method is deprecated.

Use getUserRatingCount instead.

abstract @Nullable Integer

Returns the number of minutes this place’s current timezone is offset from UTC.

abstract @Nullable LatLngBounds

Returns a viewport for displaying this Place.

abstract @Nullable Uri

Returns the URI of the website of this Place.

abstract Place.BooleanPlaceAttributeValue

This method is deprecated.

For the Places API (New), use getAccessibilityOptions instead.

@Nullable Boolean

This method is deprecated.

Use the com.google.android.libraries.places.api.net.PlacesClient isOpen method instead.

@Nullable Boolean
isOpen(long utcTimeMillis)

This method is deprecated.

Use isOpen instead.

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)

Constants

PRICE_LEVEL_MAX_VALUE

public static final int PRICE_LEVEL_MAX_VALUE = 4

The highest price level possible, for example, very expensive. See getPriceLevel for more information.

PRICE_LEVEL_MIN_VALUE

public static final int PRICE_LEVEL_MIN_VALUE = 0

The lowest price level possible.

This denotes that a place is free. See getPriceLevel for more information.

RATING_MAX_VALUE

public static final double RATING_MAX_VALUE = 5.0

The highest rating possible, for example, very good. See getRating for more information.

RATING_MIN_VALUE

public static final double RATING_MIN_VALUE = 1.0

The lowest rating possible, for example, very bad. See getRating for more information.

Public constructors

Place

public Place()

Public methods

builder

public static Place.Builder builder()

Returns a Builder.

getAccessibilityOptions

public abstract @Nullable AccessibilityOptions getAccessibilityOptions()

Returns the AccessibilityOptions a place offers.

The accessibility options 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.

getAddress

public abstract @Nullable String getAddress()

Returns a human-readable address for this Place. May return null if the address is unknown.

initialize is used to specify the localization of the address; if a locale is not set, the device's locale is used instead.

getAddressComponents

public abstract @Nullable AddressComponents getAddressComponents()

Returns the address components for this Place's location.

initialize is used to specify the localization of the address components; if a locale is not set, the device's locale is used instead.

getAdrFormatAddress

public abstract @Nullable String getAdrFormatAddress()

Returns the place's address in adr microformat.

The adr format address 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.

getAllowsDogs

public abstract Place.BooleanPlaceAttributeValue getAllowsDogs()

Returns the BooleanPlaceAttributeValue if a place allows dogs.

Allows dogs data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getAttributions

public abstract @Nullable List<StringgetAttributions()

Returns the attributions that must be shown to the user, if data from the Place is used.

We recommend placing this information below any other Place data. See Displaying Attributions for more details.

This list should not be modified.

Returns
@Nullable List<String>

The attributions in HTML format, or null if there are no attributions to display.

getBusinessStatus

public abstract @Nullable Place.BusinessStatus getBusinessStatus()

Returns the BusinessStatus for this Place.

getCurbsidePickup

public abstract Place.BooleanPlaceAttributeValue getCurbsidePickup()

Returns the BooleanPlaceAttributeValue for curbside pickup.

getCurrentOpeningHours

public abstract @Nullable OpeningHours getCurrentOpeningHours()

Returns this Place's hours of operation over the next seven days.

The time period starts at midnight on the date of the request and ends at 11:59 pm six days later.

getCurrentSecondaryOpeningHours

public abstract @Nullable List<OpeningHoursgetCurrentSecondaryOpeningHours()

Returns this Place's secondary hours of operation(s) over the next seven days.

Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as secondary hours. For the different types of secondary hours, see OpeningHours.HoursType.

The current secondary opening hours 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.

getDelivery

public abstract Place.BooleanPlaceAttributeValue getDelivery()

Returns the BooleanPlaceAttributeValue for delivery.

getDineIn

public abstract Place.BooleanPlaceAttributeValue getDineIn()

Returns the BooleanPlaceAttributeValue for indoor or outdoor seating options.

getDisplayName

public abstract @Nullable String getDisplayName()

Returns the display name of this Place.

initialize (or initializeWithNewPlacesApiEnabled) is used to specify the localization of the display name; if a locale is not set, the device's locale is used instead.

If neither locale is available, a default locale set by the places service will be used.

getDisplayNameLanguageCode

public abstract @Nullable String getDisplayNameLanguageCode()

Returns the display name's language code, if available.

The display name's language code 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.

getEditorialSummary

public abstract @Nullable String getEditorialSummary()

Returns a medium-length (150 characters max) textual summary of the place.

getEditorialSummaryLanguageCode

public abstract @Nullable String getEditorialSummaryLanguageCode()

Returns the editorial summary's language code, if available.

getEvChargeOptions

public abstract @Nullable EVChargeOptions getEvChargeOptions()

Returns the EVChargeOptions a place offers.

The ev charge options 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.

getFormattedAddress

public abstract @Nullable String getFormattedAddress()

Returns a full, human-readable address for this place.

getFuelOptions

public abstract @Nullable FuelOptions getFuelOptions()

Returns the FuelOptions a place offers.

The fuel options 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.

getGoodForChildren

public abstract Place.BooleanPlaceAttributeValue getGoodForChildren()

Returns the BooleanPlaceAttributeValue if a place is good for children.

Good for children data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getGoodForGroups

public abstract Place.BooleanPlaceAttributeValue getGoodForGroups()

Returns the BooleanPlaceAttributeValue if a place is good for groups.

Good for groups data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getGoodForWatchingSports

public abstract Place.BooleanPlaceAttributeValue getGoodForWatchingSports()

Returns the BooleanPlaceAttributeValue if a place is good for watching sports.

Good for watching sports data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getGoogleMapsUri

public abstract @Nullable Uri getGoogleMapsUri()

Returns a URI providing more information about this place.

The Google Maps URL 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.

getIconBackgroundColor

public abstract @Nullable @ColorInt Integer getIconBackgroundColor()

Returns the @ColorInt of the icon background color. Returns null if not available.

The background color is according to the Place's type. It can be used to color the view behind the icon.

getIconMaskUrl

public abstract @Nullable String getIconMaskUrl()

Returns the icon mask PNG URL string to the Places's type. Returns null if not available.

The URL link does not expire and the image size aspect ratio may be different depending on type.

getIconUrl

public abstract @Nullable String getIconUrl()

Returns the icon PNG URL string to the Places's type. Returns null if not available.

The URL link does not expire and the image size aspect ratio may be different depending on type.

getId

public abstract @Nullable String getId()

Returns the unique ID of this Place.

Create a com.google.android.libraries.places.api.net.FetchPlaceRequest using the ID, and then pass the request into a fetch place call to look up the same place at a later time.

Place ID data is constantly changing, so it is possible for subsequent requests using the same ID to fail (for example, if the place no longer exists in the database). A returned Place may also have a different ID from the ID specified in the request, as there may be multiple IDs for a given place.

getInternationalPhoneNumber

public abstract @Nullable String getInternationalPhoneNumber()

Returns the place's phone number in international format. Returns null if no phone number is known, or the place has no phone number.

International format includes the country code, and is prefixed with the plus (+) sign. For example, the international phone number for Google's Mountain View, USA office is +1 650-253-0000.

getLatLng

public abstract @Nullable LatLng getLatLng()

Returns the location of this Place.

The location is not necessarily the center of the Place, or any particular entry or exit point, but some arbitrarily chosen point within the geographic extent of the Place.

getLiveMusic

public abstract Place.BooleanPlaceAttributeValue getLiveMusic()

Returns the BooleanPlaceAttributeValue if a place provides live music.

Live music data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getLocation

public abstract @Nullable LatLng getLocation()

Returns the location of this Place.

The location is not necessarily the center of the Place, or any particular entry or exit point, but some arbitrarily chosen point within the geographic extent of the Place.

getMenuForChildren

public abstract Place.BooleanPlaceAttributeValue getMenuForChildren()

Returns the BooleanPlaceAttributeValue if a place provides menu for children.

Menu for children data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getName

public abstract @Nullable String getName()

Returns the name of this Place.

initialize is used to specify the localization of the name; if a locale is not set, the device's locale is used instead.

If neither locale is available, a default locale set by the places service will be used.

getNameLanguageCode

public abstract @Nullable String getNameLanguageCode()

Returns the name's language code, if available.

The language code of name 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.

getNationalPhoneNumber

public abstract @Nullable String getNationalPhoneNumber()

Returns the place's phone number in national format. Returns null if no phone number is known, or the place has no national phone number.

The national phone number 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.

getOpeningHours

public abstract @Nullable OpeningHours getOpeningHours()

Returns this Place's normal business hours.

getOutdoorSeating

public abstract Place.BooleanPlaceAttributeValue getOutdoorSeating()

Returns the BooleanPlaceAttributeValue if a place provides outdoor seating.

Outdoor seating data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getParkingOptions

public abstract @Nullable ParkingOptions getParkingOptions()

Returns the ParkingOptions a place offers.

The parking options 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.

getPaymentOptions

public abstract @Nullable PaymentOptions getPaymentOptions()

Returns the PaymentOptions a place offers.

The payment options 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.

getPhoneNumber

public abstract @Nullable String getPhoneNumber()

Returns the place's phone number in international format. Returns null if no phone number is known, or the place has no phone number.

International format includes the country code, and is prefixed with the plus (+) sign. For example, the international phone number for Google's Mountain View, USA office is +1 650-253-0000.

getPhotoMetadatas

public abstract @Nullable List<PhotoMetadatagetPhotoMetadatas()

Returns the metadata for a photo associated with a place.

Photos are sourced from a variety of locations, including business owners and photos contributed by Google+ users. In most cases, these photos can be used without attribution, or will have the required attribution included as a part of the image. However, you must call getAttributions to retrieve any additional attributions required, and display those attributions in your application wherever you display the image. For more information, see the developer's guide.

This list should not be modified.

getPlaceTypes

public abstract @Nullable List<StringgetPlaceTypes()

Returns a list of place types for this Place.

The returned list is based on which API version you are using.

If you enable Places API (New), then the list is the new Table A and B

If you enable Places API, then the list is the old Table 1 and 2

getPlusCode

public abstract @Nullable PlusCode getPlusCode()

Returns the PlusCode location of this Place.

The location is not necessarily the center of the Place, or any particular entry or exit point, but some arbitrarily chosen point within the geographic extent of the Place.

getPriceLevel

public abstract @Nullable @IntRange(from = 0, to = 4) Integer getPriceLevel()

Returns the price level for this place, on a scale from PRICE_LEVEL_MIN_VALUE to PRICE_LEVEL_MAX_VALUE.

If no price level is known, null is returned.

The exact amount indicated by a specific value will vary from region to region, though a value of PRICE_LEVEL_MIN_VALUE always denotes that this place is free.

getPrimaryType

public abstract @Nullable String getPrimaryType()

Returns the primary place type for this Place.

A place can only have a single primary type. For the complete list of possible values, see Table A and B

The primary type 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.

getPrimaryTypeDisplayName

public abstract @Nullable String getPrimaryTypeDisplayName()

Returns the display name of primary place type for this Place, if available.

The primary type display name 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.

getPrimaryTypeDisplayNameLanguageCode

public abstract @Nullable String getPrimaryTypeDisplayNameLanguageCode()

Returns the primary type display name's language code, if available.

The language code of primary type display name 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.

getRating

public abstract @Nullable @FloatRange(from = 1.0, to = 5.0) Double getRating()

Returns the place's rating, from RATING_MIN_VALUE to RATING_MAX_VALUE, based on aggregated user reviews.

If no rating is known, null is returned.

getReservable

public abstract Place.BooleanPlaceAttributeValue getReservable()

Returns the BooleanPlaceAttributeValue for reservations.

getResourceName

public abstract @Nullable String getResourceName()

Returns the unique resource name of this Place.

The resource name 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.

getRestroom

public abstract Place.BooleanPlaceAttributeValue getRestroom()

Returns the BooleanPlaceAttributeValue if a place provides restroom.

Restroom data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getReviews

public abstract @Nullable List<ReviewgetReviews()

Returns up to five reviews associated with a place.

The reviews 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. Google recommends that you display how reviews are being sorted to the end user. The default is to sort the reviews by relevance. For the new APIs, sorting by relevance is the only option.

getSecondaryOpeningHours

public abstract @Nullable List<OpeningHoursgetSecondaryOpeningHours()

Returns this Place's secondary hours of operation(s).

The returned type of secondary hours of operation(s) is based on which API version you are using.

If you enable Places API (New), it returns this Place's normal secondary hours of operation(s).

If you enable Places API, it returns this Place's secondary hours of operation(s) over the next seven days.

Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as secondary hours. For the different types of secondary hours, see OpeningHours.HoursType.

getServesBeer

public abstract Place.BooleanPlaceAttributeValue getServesBeer()

Returns the BooleanPlaceAttributeValue for serving beer.

getServesBreakfast

public abstract Place.BooleanPlaceAttributeValue getServesBreakfast()

Returns the BooleanPlaceAttributeValue for serving breakfast.

getServesBrunch

public abstract Place.BooleanPlaceAttributeValue getServesBrunch()

Returns the BooleanPlaceAttributeValue for serving brunch.

getServesCocktails

public abstract Place.BooleanPlaceAttributeValue getServesCocktails()

Returns the BooleanPlaceAttributeValue if a place serves cocktails.

Cocktails data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getServesCoffee

public abstract Place.BooleanPlaceAttributeValue getServesCoffee()

Returns the BooleanPlaceAttributeValue if a place serves coffee.

Coffee data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getServesDessert

public abstract Place.BooleanPlaceAttributeValue getServesDessert()

Returns the BooleanPlaceAttributeValue if a place serves dessert.

Dessert data is only available through the Places API (New). Please enable your API key for the Places API (New) in the Google Cloud Console to access the data.

getServesDinner

public abstract Place.BooleanPlaceAttributeValue getServesDinner()

Returns the BooleanPlaceAttributeValue for serving dinner.

getServesLunch

public abstract Place.BooleanPlaceAttributeValue getServesLunch()

Returns the BooleanPlaceAttributeValue for serving lunch.

getServesVegetarianFood

public abstract Place.BooleanPlaceAttributeValue getServesVegetarianFood()

Returns the BooleanPlaceAttributeValue for serving vegetarian food.

getServesWine

public abstract Place.BooleanPlaceAttributeValue getServesWine()

Returns the BooleanPlaceAttributeValue for serving wine.

getShortFormattedAddress

public abstract @Nullable String getShortFormattedAddress()

Returns a short, human-readable address for this place.

The short formatted address 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.

getSubDestinations

public abstract @Nullable List<SubDestinationgetSubDestinations()

Returns a list of sub-destinations related to the place.

The sub-destinations 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.

getTakeout

public abstract Place.BooleanPlaceAttributeValue getTakeout()

Returns the BooleanPlaceAttributeValue for takeout service.

getTypes

public abstract @Nullable List<Place.TypegetTypes()

Returns a list of place types for this Place.

The elements of this list are drawn from Place.TYPE_* constants, though one should expect there could be new place types returned that were introduced after an app was published.

This list should not be modified.

getUserRatingCount

public abstract @Nullable @IntRange(from = 0) Integer getUserRatingCount()

Returns the total number of user ratings of this Place. Returns null if the number of user ratings is not known.

getUserRatingsTotal

public abstract @Nullable @IntRange(from = 0) Integer getUserRatingsTotal()

Returns the total number of user ratings of this Place. Returns null if the number of user ratings is not known.

getUtcOffsetMinutes

public abstract @Nullable Integer getUtcOffsetMinutes()

Returns the number of minutes this place’s current timezone is offset from UTC.

getViewport

public abstract @Nullable LatLngBounds getViewport()

Returns a viewport for displaying this Place. May return null if the size of the place is not known.

This returns a viewport of a size that is suitable for displaying this Place. For example, a Place representing a store may have a relatively small viewport, while a Place representing a country may have a very large viewport.

getWebsiteUri

public abstract @Nullable Uri getWebsiteUri()

Returns the URI of the website of this Place. Returns null if no website is known.

This is the URI of the website maintained by the Place, if available. This link is always for a third-party website not affiliated with the Places API.

getWheelchairAccessibleEntrance

public abstract Place.BooleanPlaceAttributeValue getWheelchairAccessibleEntrance()

Returns the BooleanPlaceAttributeValue for a wheelchair accessible entrance.

isOpen

public @Nullable Boolean isOpen()

Calculates if the place is open at the device's current time.

To ensure accurate results, UTC_OFFSET and BUSINESS_STATUS must be requested when using findCurrentPlace or fetchPlace. If BUSINESS_STATUS is not requested, it is assumed that the business is operational.

Returns
@Nullable Boolean

whether the place is open at the device's current time. Returns null if the 's getPeriods is null or getUtcOffsetMinutes is null.

isOpen

public @Nullable Boolean isOpen(long utcTimeMillis)

Calculates if the place is open at utcTimeMillis.

To ensure accurate results, UTC_OFFSET and BUSINESS_STATUS must be requested when using findCurrentPlace or fetchPlace. If BUSINESS_STATUS is not requested, it is assumed that the business is operational.

Parameters
long utcTimeMillis

the milliseconds from 1970-01-01T00:00:00Z.

Returns
@Nullable Boolean

whether the place is open at utcTimeMillis. Returns null if the Place's getPeriods is null or getUtcOffsetMinutes is null.