Overview
//trimble-id-android/com.trimble.id.android/MultiUserAccountManager
MultiUserAccountManager
class MultiUserAccountManager(authenticator: Authenticator) : IAccountManager
AccountManager is responsible for managing user accounts in a multi-user environment. It interacts with the provided Authenticator instance to handle authentication-related tasks.
Parameters
androidJvm
| authenticator | An instance of Authenticator used for authentication operations. |
Constructors
| MultiUserAccountManager | [androidJvm] constructor(authenticator: Authenticator) |
Functions
| Name | Summary |
|---|---|
| addAccount | [androidJvm] open override fun addAccount(callback: ILoginResponseCallback, launchAsTrustedWebActivity: Boolean) Add a new account. |
| canAddAccounts | [androidJvm] open suspend override fun canAddAccounts(): Boolean Check if more accounts can be added. |
| getAccounts | [androidJvm] open suspend override fun getAccounts(): List<Account> Retrieve a list of all stored accounts. This method fetches all accounts currently managed by the application. |
| getActiveAccount | [androidJvm] open suspend override fun getActiveAccount(): Account Retrieve the currently active account. It is typically used to fetch the account that the user is currently logged into. |
| removeAccount | [androidJvm] open suspend override fun removeAccount(id: String): Boolean Remove a specific account by its identifier. |
| switchAccount | [androidJvm] open override fun switchAccount(id: String, callback: ILoginResponseCallback, launchAsTrustedWebActivity: Boolean) Switch to an existing account. The user will be prompted to log in again to complete the account switch process. |