public class

ResolvableApiException

extends ApiException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ com.google.android.gms.common.api.ApiException
         ↳ com.google.android.gms.common.api.ResolvableApiException

Class Overview

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

Summary

[Expand]
Inherited Fields
From class com.google.android.gms.common.api.ApiException
Public Constructors
ResolvableApiException(Status status)
Public Methods
PendingIntent getResolution()
A pending intent to resolve the failure.
void startResolutionForResult(Activity activity, int requestCode)
Resolves an error by starting any intents requiring user interaction.
[Expand]
Inherited Methods
From class com.google.android.gms.common.api.ApiException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public ResolvableApiException (Status status)

Parameters
status Status

Public Methods

public PendingIntent getResolution ()

A pending intent to resolve the failure. This intent can be started with startIntentSenderForResult(IntentSender, int, Intent, int, int, int) to present UI to solve the issue.

Returns
PendingIntent The pending intent to resolve the failure.

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.
requestCode int: The request code to pass to onActivityResult.
Throws
IntentSender.SendIntentException If the resolution intent has been canceled or is no longer able to execute the request.