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.

Inherited Field Summary

Public Constructor Summary

Public Method Summary

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.

Inherited Method Summary

Public Constructors

public ResolvableApiException (Status status)

Public Methods

public PendingIntent getResolution ()

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

Returns
  • 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 CommonStatusCodes.SIGN_IN_REQUIRED, and CommonStatusCodes.RESOLUTION_REQUIRED.

Parameters
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 Activity.RESULT_OK, the application should try to connect again.
requestCode 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.