Client to manage Android for Work Accounts. This class provides methods for managing the lifecycle of work accounts.
Android for Work Accounts are for organizations that don't use Google Accounts. For details, see the EMM Developer's Overview.
Public Method Summary
Task<Account> | |
Task<Void> | |
Task<Void> |
setWorkAuthenticatorEnabled(boolean enabled)
Changes the availability of work accounts in
AccountManager .
|
Inherited Method Summary
Public Methods
public Task<Account> addWorkAccount (String token)
Adds a work account to AccountManager
.
Parameters
token | OAuth token for the account. |
---|
Returns
Task
indicating whether adding the account has succeeded.
public Task<Void> removeWorkAccount (Account account)
Removes a work account from AccountManager
.
Parameters
account | the account to be removed. |
---|
Returns
Task
indicating whether removing the account has succeeded.
public Task<Void> setWorkAuthenticatorEnabled (boolean enabled)
Changes the availability of work accounts in AccountManager
.
Parameters
enabled | true to enable work accounts; false to disable work
accounts. |
---|
Returns
Task
indicating whether enabling or disabling work accounts request has been accepted byAccountManager
. Please note that the actual enabling or disabling operation is performed asynchronously.