目录

UserAddress

Class Info

public final class UserAddress

Address information returned after a user selects an address.

Public Method Summary

Qualifier and Type

Method Name and Description

UserAddress

parseIntent(Intent data)

Parses the address selected by a user from an Intent object.

String

getAddressLine1()

Obtains the address in the first line. If it is omitted, use "" by default.

String

getAddressLine2()

Obtains the address in the second line. If it is omitted, use "" by default.

String

getAddressLine3()

Obtains the address in the third line. If it is omitted, use "" by default.

String

getAddressLine4()

Obtains the address in the fourth line. If it is omitted, use "" by default.

String

getAddressLine5()

Obtains the address in the fifth line. If it is omitted, use "" by default.

String

getAdministrativeArea()

Obtains the administrative area name. If it is omitted, use "" by default.

String

getCompanyName()

Obtains the company name. If it is omitted, use "" by default.

String

getCountryCode()

Obtains the country/region name. If it is omitted, use "" by default.

String

getCountryISOCode()

Obtains the country/region code. If it is omitted, use "" by default.

String

getEmailAddress()

Obtains the email address. If it is omitted, use "" by default.

String

getLocality()

Obtains the city or county information. If it is omitted, use "" by default.

String

getName()

Obtains the name. If it is omitted, use "" by default.

String

getPhoneNumber()

Obtains the mobile number. If it is omitted, use "" by default.

String

getPostalNumber()

Obtains the postal code. If it is omitted, use "" by default.

Public Methods

[h2]parseIntent

Method

public static UserAddress parseIntent(Intent data)

Parses user address data from an Intent object. This method is called in onActivityResult of Activity.

After a user selects an address, the selected address is carried in the intent object and returned through the onActivityResult method. You can use the parseIntent method to parse the selected address from the Intent object.

Parameters

Name

Description

data

Intent object that contains user address data.

Returns

Type

Description

UserAddress

Address information returned after a user selects an address.

[h2]getAddressLine1

Method

public final String getAddressLine1()

Obtains the address in the first line.

Returns

Type

Description

String

Address in the first line. If it is omitted, use "" by default.

[h2]getAddressLine2

Method

public final String getAddressLine2()

Obtains the address in the second line.

Returns

Type

Description

String

Address in the second line. If it is omitted, use "" by default.

[h2]getAddressLine3

Method

public final String getAddressLine3()

Obtains the address in the third line.

Returns

Type

Description

String

Address in the third line. If it is omitted, use "" by default.

[h2]getAddressLine4

Method

public final String getAddressLine4()

Obtains the address in the fourth line.

Returns

Type

Description

String

Address in the fourth line. If it is omitted, use "" by default.

[h2]getAddressLine5

Method

public final String getAddressLine5()

Obtains the address in the fifth line.

Returns

Type

Description

String

Address in the fifth line. If it is omitted, use "" by default.

[h2]getAdministrativeArea

Method

public final String getAdministrativeArea()

Obtains the administrative area name.

Returns

Type

Description

String

Administrative area name. If it is omitted, use "" by default.

[h2]getCompanyName

Method

public final String getCompanyName()

Obtains the company name.

Returns

Type

Description

String

Company name. If it is omitted, use "" by default.

[h2]getCountryCode

Method

public final String getCountryCode()

Obtains the country/region name.

Returns

Type

Description

String

Country/Region name. If it is omitted, use "" by default.

[h2]getCountryISOCode

Method

public final String getCountryISOCode()

Obtains the country/region code.

Returns

Type

Description

String

Country/Region code. The value must comply with ISO 3166 standards, for example, US, CN, and MY. If it is omitted, use "" by default.

[h2]getEmailAddress

Method

public final String getEmailAddress()

Obtains the email address.

Returns

Type

Description

String

Email address. If it is omitted, use "" by default.

[h2]getLocality

Method

public final String getLocality()

Obtains the city or county information.

Returns

Type

Description

String

City or county information. If it is omitted, use "" by default.

[h2]getName

Method

public final String getName()

Obtains the name.

Returns

Type

Description

String

Name. If it is omitted, use "" by default.

[h2]getPhoneNumber

Method

public final String getPhoneNumber()

Obtains the mobile number.

Returns

Type

Description

String

Mobile number. If it is omitted, use "" by default.

[h2]getPostalNumber

Method

public final String getPostalNumber()

Obtains the postal code.

Returns

Type

Description

String

Postal code. If it is omitted, use "" by default.