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 latest Account.
      void observeAccount(ObservationScope observationScope, <any> observer)
      Observes changes to the Account in real-time.
    • Method Detail

      • getAccount

        void getAccount(<any> callback)
        Gets the latest Account.
        Parameters:
        callback - The callback to invoke which will return an Account or an ErrorResponse
      • getAccount

        Account getAccount()
        Gets the currently cached account.
        Returns:
        The current Account or null if there is no cached value
      • observeAccount

        void observeAccount(ObservationScope observationScope,
                            <any> observer)
        Observes changes to the Account in real-time.
        Parameters:
        observationScope - the lifespan of the observation
        observer - The observer to be notified when Account data changes