ResolvableApiException

public class ResolvableApiException extends ApiException


Exception to be returned by a Task when a call to Google Play services has failed with a possible resolution.

Summary

Public constructors

Public methods

PendingIntent

A pending intent to resolve the failure.

void
startResolutionForResult(Activity activity, int requestCode)

Resolves an error by starting any intents requiring user interaction.

Inherited fields

From com.google.android.gms.common.api.ApiException
final Status
@SuppressViolation(value = "hide_members_annotation")
mStatus

This field is deprecated.

use getStatus instead.

Inherited methods

From com.google.android.gms.common.api.ApiException
@NonNull Status

Returns the status of the operation.

int

Indicates the status of the operation.

@Nullable String

This method is deprecated.

use getMessage for a summary of the cause.

From java.lang.Throwable
synchronized final void
synchronized Throwable
synchronized Throwable
String
String
StackTraceElement[]
synchronized final Throwable[]
synchronized Throwable
void
void
setStackTrace(StackTraceElement[] p)
String

Public constructors

ResolvableApiException

public ResolvableApiException(@NonNull Status status)

Public methods

getResolution

public PendingIntent getResolution()

A pending intent to resolve the failure. This intent can be started with startIntentSenderForResult to present UI to solve the issue.

Returns
PendingIntent

The pending intent to resolve the failure.

startResolutionForResult

public void startResolutionForResult(Activity activity, int requestCode)

Resolves an error by starting any intents requiring user interaction. See SIGN_IN_REQUIRED, and RESOLUTION_REQUIRED.

Parameters
Activity activity

An Activity context to use to resolve the issue. The activity's onActivityResult method will be invoked after the user is done. If the resultCode is RESULT_OK, the application should try to connect again.

int requestCode

The request code to pass to onActivityResult.

Throws
android.content.IntentSender.SendIntentException

If the resolution intent has been canceled or is no longer able to execute the request.