public class Status extends java.lang.Object implements Result, android.os.Parcelable
LocationServices API call.| Modifier and Type | Field and Description |
|---|---|
static int |
CANCELLED |
static android.os.Parcelable.Creator<Status> |
CREATOR |
static int |
INTERNAL_ERROR |
static int |
INTERRUPTED |
static int |
RESOLUTION_REQUIRED |
static int |
SETTINGS_CHANGE_UNAVAILABLE |
static int |
SUCCESS |
static int |
TIMEOUT |
| Modifier | Constructor and Description |
|---|---|
|
Status(int statusCode) |
|
Status(int statusCode,
DialogDisplayer dialogDisplayer) |
|
Status(int statusCode,
DialogDisplayer dialogDisplayer,
android.app.PendingIntent pendingIntent) |
protected |
Status(android.os.Parcel in) |
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
android.app.PendingIntent |
getResolution()
Get the
PendingIntent if there is one. |
Status |
getStatus() |
int |
getStatusCode()
Get the status code.
|
java.lang.String |
getStatusMessage()
Get the detailed status message for this
Status. |
boolean |
hasResolution()
Is there a resolution for this
Status. |
boolean |
isCanceled()
Is the status code for this object
CANCELLED. |
boolean |
isInterrupted()
Is the status code for this object
INTERRUPTED. |
boolean |
isSuccess()
Is the status code for this object
SUCCESS. |
void |
startResolutionForResult(android.app.Activity activity,
int requestCode)
If the status code is
RESOLUTION_REQUIRED, then this method can be called to
start the resolution. |
void |
writeToParcel(android.os.Parcel parcel,
int i) |
public static final int SUCCESS
public static final int RESOLUTION_REQUIRED
public static final int INTERRUPTED
public static final int INTERNAL_ERROR
public static final int TIMEOUT
public static final int CANCELLED
public static final int SETTINGS_CHANGE_UNAVAILABLE
public static final android.os.Parcelable.Creator<Status> CREATOR
public Status(int statusCode)
public Status(int statusCode,
DialogDisplayer dialogDisplayer)
public Status(int statusCode,
DialogDisplayer dialogDisplayer,
android.app.PendingIntent pendingIntent)
protected Status(android.os.Parcel in)
public void startResolutionForResult(android.app.Activity activity,
int requestCode)
throws android.content.IntentSender.SendIntentException
RESOLUTION_REQUIRED, then this method can be called to
start the resolution. For example, it will launch the Settings Activity so that the
user can update location settings when used with SettingsApi.checkLocationSettings(
LostApiClient, LocationSettingsRequest). This activity will finish with
Activity.onActivityResult(int, int, android.content.Intent) but the resultCode will
never be Activity#RESULT_OK. You should instead rely on the requestCode to determine
application flow and assume that the result is Activity#RESULT_OK.activity - to launch for resolution.requestCode - associated with activity.IntentSender.SendIntentExceptionpublic java.lang.String getStatusMessage()
Status.public boolean hasResolution()
Status.public boolean isSuccess()
SUCCESS.SUCCESS.public boolean isCanceled()
CANCELLED.CANCELLED.public boolean isInterrupted()
INTERRUPTED.INTERRUPTED.public int getStatusCode()
public android.app.PendingIntent getResolution()
PendingIntent if there is one. This method can return null.PendingIntent.public int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel parcel,
int i)
writeToParcel in interface android.os.Parcelable