public interface

# WorkAccountApi

com.google.android.gms.auth.account.WorkAccountApi

## Class Overview

Set of APIs to manage Android for Work Accounts. This class provides methods for managing the life cycle of work accounts.

Android for Work Accounts are for organizations that don't use Google Accounts. For details, see the EMM Developer's Overview.

## Summary

Nested Classes
interface | WorkAccountApi.AddAccountResult | Interface for result of `addWorkAccount(GoogleApiClient, String)`.

Public Methods
abstract PendingResult<WorkAccountApi.AddAccountResult> | addWorkAccount(GoogleApiClient apiClient, String token) Add a work account to `AccountManager`.
abstract PendingResult<Result> | removeWorkAccount(GoogleApiClient apiClient, Account account) Remove a work account from `AccountManager`.
abstract void | setWorkAuthenticatorEnabled(GoogleApiClient apiClient, boolean enabled) Change the availability of work accounts in `AccountManager`.

## Public Methods

#### public abstract PendingResult<WorkAccountApi.AddAccountResult> addWorkAccount (GoogleApiClient apiClient, String token)

Add a work account to `AccountManager`.

##### Parameters

apiClient | The `GoogleApiClient` to service this call.
token | OAuth token for the account.

##### Returns

- `PendingResult` indicating whether adding the account has succeeded.

#### public abstract PendingResult<Result> removeWorkAccount (GoogleApiClient apiClient, Account account)

Remove a work account from `AccountManager`.

##### Parameters

apiClient | The `GoogleApiClient` to service this call.
account | the account to be removed.

##### Returns

- `PendingResult` indicating whether removing the account has succeeded.

#### public abstract void setWorkAuthenticatorEnabled (GoogleApiClient apiClient, boolean enabled)

Change the availability of work accounts in `AccountManager`.

##### Parameters

apiClient | The `GoogleApiClient` to service this call.
enabled | `true` to enable work accounts; `false` to disable work accounts.