public final class

GoogleAuthApiClientImpl

extends Object
java.lang.Object
   ↳ com.google.android.gms.auth.api.GoogleAuthApiClientImpl

Class Overview

Main public API entry point for the google auth api client.

Summary

Constants
String ACTION_START_SERVICE
String DEFAULT_ACCOUNT
String FEATURE_GOOGLE_ME
String KEY_PENDING_INTENT
String SERVICE_DESCRIPTOR
Public Constructors
GoogleAuthApiClientImpl(Context context, ClientSettings settings, GoogleApiClient.ConnectionCallbacks connectedListener, GoogleApiClient.OnConnectionFailedListener connectionFailedListener, String accountName, String[] scopes)
GoogleAuthApiClientImpl(Context context, Looper looper, ClientSettings settings, GoogleApiClient.ConnectionCallbacks connectedListener, GoogleApiClient.OnConnectionFailedListener connectionFailedListener, String accountName, String[] scopes)
Public Methods
void connect()
void disconnect()
String getAccountName()
Bundle getConnectionHint()
Get connection hint data to pass to clients in their onConnected(Bundle) methods.
abstract Looper getLooper()
Returns the Looper to use when invoking callbacks.
boolean isConnected()
boolean isConnecting()
boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks listener)
boolean isConnectionFailedListenerRegistered(GooglePlayServicesClient.OnConnectionFailedListener listener)
void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks listener)
void registerConnectionCallbacks(GoogleApiClient.ConnectionCallbacks listener)
void registerConnectionFailedListener(GooglePlayServicesClient.OnConnectionFailedListener listener)
void registerConnectionFailedListener(GoogleApiClient.OnConnectionFailedListener listener)
final void setService(T extends IInterface service)
For testing, allow clients to explicitly set the service.
boolean shouldPerformConnectionCallbacks()
void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks listener)
void unregisterConnectionFailedListener(GooglePlayServicesClient.OnConnectionFailedListener listener)
Protected Methods
IGoogleAuthService createServiceInterface(IBinder iBinder)
Creates the service interface based on the given binder.
String getServiceDescriptor()
String getStartServiceAction()
void onConnected()
Called when connected.
void onDisconnected()
Called when disconnected explicitly or the service connection is disconnected.
void onPostInitHandler(int statusCode, IBinder service, Bundle resolution)
Callback invoked after the connection has been initialized, and before the GMS GoogleApiClient.ConnectionCallbacks are invoked.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ACTION_START_SERVICE

Constant Value: "com.google.android.gms.auth.service.START"

protected static final String DEFAULT_ACCOUNT

Constant Value: "<>"

public static final String FEATURE_GOOGLE_ME

Constant Value: "service_googleme"

public static final String KEY_PENDING_INTENT

Constant Value: "pendingIntent"

public static final String SERVICE_DESCRIPTOR

Constant Value: "com.google.android.gms.auth.api.IGoogleAuthService"

Public Constructors

public GoogleAuthApiClientImpl (Context context, ClientSettings settings, GoogleApiClient.ConnectionCallbacks connectedListener, GoogleApiClient.OnConnectionFailedListener connectionFailedListener, String accountName, String[] scopes)

public GoogleAuthApiClientImpl (Context context, Looper looper, ClientSettings settings, GoogleApiClient.ConnectionCallbacks connectedListener, GoogleApiClient.OnConnectionFailedListener connectionFailedListener, String accountName, String[] scopes)

Public Methods

public void connect ()

public void disconnect ()

public String getAccountName ()

public Bundle getConnectionHint ()

Get connection hint data to pass to clients in their onConnected(Bundle) methods. The base implementation simply returns null, but subclasses are free to override and provide whatever information is appropriate for their clients.

Returns
  • service-specific Bundle of connection data.

public abstract Looper getLooper ()

Returns the Looper to use when invoking callbacks.

public boolean isConnected ()

public boolean isConnecting ()

Returns
  • true if connect() has been called, and the client is waiting for a callback.

public boolean isConnectionCallbacksRegistered (GooglePlayServicesClient.ConnectionCallbacks listener)

public boolean isConnectionFailedListenerRegistered (GooglePlayServicesClient.OnConnectionFailedListener listener)

public void registerConnectionCallbacks (GooglePlayServicesClient.ConnectionCallbacks listener)

public void registerConnectionCallbacks (GoogleApiClient.ConnectionCallbacks listener)

public void registerConnectionFailedListener (GooglePlayServicesClient.OnConnectionFailedListener listener)

public void registerConnectionFailedListener (GoogleApiClient.OnConnectionFailedListener listener)

public final void setService (T extends IInterface service)

For testing, allow clients to explicitly set the service.

public boolean shouldPerformConnectionCallbacks ()

public void unregisterConnectionCallbacks (GooglePlayServicesClient.ConnectionCallbacks listener)

public void unregisterConnectionFailedListener (GooglePlayServicesClient.OnConnectionFailedListener listener)

Protected Methods

protected IGoogleAuthService createServiceInterface (IBinder iBinder)

Creates the service interface based on the given binder. The service descriptor will already have been verified.

Parameters
iBinder The binder returned by the service connection.
Returns
  • The service interface for this client.

protected String getServiceDescriptor ()

Returns
  • The descriptor String returned by the service to indicate a successful service connection.

protected String getStartServiceAction ()

Returns
  • The intent action String to be used to start the service.

protected void onConnected ()

Called when connected. Override this to do something in your client before clients are notified of connection.

protected void onDisconnected ()

Called when disconnected explicitly or the service connection is disconnected. Override this to do something in your client before clients are notified of disconnection.

protected void onPostInitHandler (int statusCode, IBinder service, Bundle resolution)

Callback invoked after the connection has been initialized, and before the GMS GoogleApiClient.ConnectionCallbacks are invoked.