AdsApp.Address
Stay organized with collections
Save and categorize content based on your preferences.
Represents the address of a geographical point. Contains information about
the street address, country, province / state, and postal code.
For instance, the address "1600 Amphitheatre Parkway, Mountain View, CA
94043" will have the following values:
getStreetAddress()
: "1600 Amphitheatre Parkway"
getStreetAddress2()
: null
getCityName()
: "Mountain View"
getProvinceCode()
: "CA"
getProvinceName()
: "California"
getPostalCode()
: "94043"
getCountryCode()
: "US"
Methods:
Member | Type | Description |
getCityName |
String |
Returns the city name, or null if not known. |
getCountryCode |
String |
Returns the country code, or null if not known. |
getPostalCode |
String |
Returns the postal code, or null if not known. |
getProvinceCode |
String |
Returns the province / state code, or null if not known. |
getProvinceName |
String |
Returns the province / state name, or null if not known. |
getStreetAddress |
String |
Returns the street address, or null if not known. |
getStreetAddress2 |
String |
Returns the second line of the street address, or null if not
known. |
getCityName()
Returns the city name, or
null
if not known.
Return values:
Type | Description |
String |
The city name, or null if not known. |
getCountryCode()
Returns the country code, or
null
if not known.
Return values:
Type | Description |
String |
The country code, or null if not known. |
getPostalCode()
Returns the postal code, or
null
if not known.
Return values:
Type | Description |
String |
The postal code, or null if not known. |
getProvinceCode()
Returns the province / state code, or
null
if not known.
For instance, addresses in California would return "CA"
.
Return values:
Type | Description |
String |
The province code, or null if not known. |
getProvinceName()
Returns the province / state name, or
null
if not known.
Return values:
Type | Description |
String |
The province name, or null if not known. |
getStreetAddress()
Returns the street address, or
null
if not known.
Return values:
Type | Description |
String |
The street address, or null if not known. |
getStreetAddress2()
Returns the second line of the street address, or
null
if not
known.
Return values:
Type | Description |
String |
The second line of the street address, or null if not
known. |
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-01-28 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-01-28 UTC."],[[["Represents the address of a geographical point, including street address, city, province/state, postal code, and country."],["Provides methods to access individual address components like street address, city, province/state, postal code, and country."],["All address component methods return a string value or `null` if the information is not available."],["The `getStreetAddress2()` method, which retrieves the second line of the street address, is deprecated."]]],[]]