A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/maps/documentation/places/android-sdk/migrate-details below:

Migrate to Place Details (New) | Places SDK for Android

Migrate to Place Details (New)

Stay organized with collections Save and categorize content based on your preferences.

This feature requires that you enable Places API (New), the next generation of the Places API. For more information, see Enable APIs.

Places SDK for Android supports Place Details (Legacy). If you are familiar with the Places SDK for Android (Legacy), Place Details (New) makes the following changes:

The following sections describe additional changes.

Access new place types

Each place can have one or more type values associated with it. The Places SDK for Android version 3.3.0 and later adds many new type values. For the complete list, see Expanded place types.

The Place.getPlaceTypes() method returns the type values as a list of string values. The values returned depend on your version of the Places SDK for Android:

Access place reviews

The Places SDK for Android (New) adds the Review class, which contains a review of a place. The Place object can contain up to five reviews.

The Review class can also contain an attribution and an author attribution. If you display the review in your app, then you must also display any attribution or author attribution. For more information, see Display a review.

For more information, see the documentation on attributions.

Access place name language code

In the Places SDK for Android (Legacy), Place.getName() method returns a text string containing the name of a place. To populate the Place object with the place name, you must include the Place.Field.DISPLAY_NAME in the field list of the place details request.

The Place object now contains the language code for the name string. To populate the Place object with language code, you must:

  1. Include the Place.Field.DISPLAY_NAME in the field list of the request. This value configures response to include both the place name and language code in the Place object.

  2. Call PlacesClient.fetchPlace(). PlacesClient.findCurrentPlace() does not support the language code field.

  3. Use the Place.getNameLanguageCode() method to access the language code field in the Place object.

Set region code

Places SDK for Android (New) adds the region code request parameter to Place Details. The region code is used to format the response, specified as a two-character CLDR code value. This parameter can also have a bias effect on the search results. There is no default value. You must enable the new SDK to set the region code.

If the country name of the address field in the response matches the region code, the country code is omitted from address.

Most CLDR codes are identical to ISO 3166-1 codes, with some notable exceptions. For example, the United Kingdom's ccTLD is "uk" (.co.uk) while its ISO 3166-1 code is "gb" (technically for the entity of "The United Kingdom of Great Britain and Northern Ireland"). The parameter can affect results based on applicable law.

Example request

For a complete example, see Place Details (New).

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-14 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4