Package zendesk.chat
Interface AccountProvider
-
public interface AccountProvider
A provider to access account information.You can access it as follows:
ProfileProvider profileProvider = Chat.INSTANCE.providers().accountProvider();
Make sure to initialize Zendesk Chat SDK first before accessing the providers, see
Chat.init(Context, String)
for more details.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description Account
getAccount()
Gets the currently cached account.void
getAccount(<any> callback)
Gets the latestAccount
.void
observeAccount(ObservationScope observationScope, <any> observer)
Observes changes to theAccount
in real-time.
-
-
-
Method Detail
-
getAccount
void getAccount(<any> callback)
Gets the latestAccount
.- Parameters:
callback
- The callback to invoke which will return anAccount
or anErrorResponse
-
getAccount
Account getAccount()
Gets the currently cached account.- Returns:
- The current
Account
ornull
if there is no cached value
-
observeAccount
void observeAccount(ObservationScope observationScope, <any> observer)
Observes changes to theAccount
in real-time.- Parameters:
observationScope
- the lifespan of the observationobserver
- The observer to be notified whenAccount
data changes
-
-