java.lang.Object | |
↳ | com.google.android.gms.identity.intents.Address |
APIs for accessing a user's address. Calling requestUserAddress(GoogleApiClient, UserAddressRequest, int)
will prompt the
user to select an address to share with your application.
Nested Classes | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Address.AddressOptions | A class that encapsulates options for the Address APIs. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
API |
Add this to your GoogleApiClient via addApi(Api extends Api.ApiOptions.NotRequiredOptions>) .
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
API to request an address from a user.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Add this to your GoogleApiClient
via addApi(Api extends Api.ApiOptions.NotRequiredOptions>)
.
API to request an address from a user. This will invoke a dialog that allows the user to
decide if they want to select a single address to share your app, or alternatively decline
to share an address at all. The response to this request is supplied via your Activity's
onActivityResult(int, int, Intent)
callback method.
RESULT_OK
is returned. You can retrieve the
UserAddress
from the data Intent sent to
onActivityResult(int, int, Intent)
using the
fromIntent(android.content.Intent)
key.RESULT_CANCELED
is returned.RESULT_ERROR
is returned. You can
retrieve the error code from the data Intent using the
EXTRA_ERROR_CODE
key.googleApiClient | used to communicate with Google Play Services. This should be
configured to use API . Must not be null. |
---|---|
request | used to specify what kind of addresses your app can handle. You
must pass in a valid UserAddressRequest created via
build() . |
requestCode | used onActivityResult(int, int, Intent) to identify which request
triggered that callback.
|