Enum Support

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Support>


    public enum Support
    extends java.lang.Enum<Support>
    Configuration class for Zendesk initialization. Call this first to configure Zendesk to use the correct credentials and Zendesk URL.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant and Description
      INSTANCE 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.List<CustomField> getCustomFields()
      Gets the custom fields
      SupportModule getSupportModule()
      Only for internal use.
      java.lang.Long getTicketFormId()
      Gets the ticket form Id
      void init(Zendesk zendesk)
      Initialises the Zendesk SDK
      boolean isInitialized()
      Gets whether Support.init(Zendesk) was called or not.
      ProviderStore provider()
      Gets a ProviderStore for accessing all available SDK Providers.
      boolean refreshRequest(java.lang.String requestId, Context context)
      Refreshes the Support SDK RequestActivity if it is currently being displayed (after Activity#onResume() but before Activity#onPause()) for the given request ID, or the RequestListActivity if it has not been destroyed (ie, by Activity#onDestroy().
      void setCustomFields(java.util.List<CustomField> customFields)
      Set a List of type CustomField to be used on request submission until unset See Mobile SDK documentation for more information on setting this.
      void setDeviceLocale(java.util.Locale deviceLocale)
      Sets the preferred device locale.
      void setTicketFormId(java.lang.Long ticketFormId)
      Set a ticket form id which will be included in all request submission until unset See Mobile SDK documentation for more information on setting this.
      static Support valueOf(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Support[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • INSTANCE

        public static final Support INSTANCE
    • Method Detail

      • values

        public static Support[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Support c : Support.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Support valueOf(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • init

        public void init(Zendesk zendesk)
        Initialises the Zendesk SDK

        Use this constructor when you have enabled the Conversations feature. This requires some authentication settings. Your zendeskUrl must be your full Zendesk URL in the form of https://{subdomain.zendesk.com You should replace {subdomain} with your own subdomain.

        As of SDK version, 1.5.0.1 , this constructor will no longer start a background service to poll the server for updates to SupportSdkSettings. A lazy loading strategy is applied to all Provider calls instead, to ensure that settings are always present before a call to Zendesk.

        Parameters:
        zendesk - The instance of zendesk to initialize Support with
      • isInitialized

        public boolean isInitialized()
        Gets whether Support.init(Zendesk) was called or not.
        Returns:
        true if init was successfully called, false otherwise.
      • setCustomFields

        public void setCustomFields(java.util.List<CustomField> customFields)
        Set a List of type CustomField to be used on request submission until unset See Mobile SDK documentation for more information on setting this.
        Parameters:
        customFields - List contain CustomField objects which will be included as part of the request
      • getCustomFields

        public java.util.List<CustomField> getCustomFields()
        Gets the custom fields
        Returns:
        the list of custom fields or null if they have not been set
      • setTicketFormId

        public void setTicketFormId(java.lang.Long ticketFormId)
        Set a ticket form id which will be included in all request submission until unset See Mobile SDK documentation for more information on setting this.
        Parameters:
        ticketFormId - Long of ticket form id
      • getTicketFormId

        public java.lang.Long getTicketFormId()
        Gets the ticket form Id
        Returns:
        the ticket form id or null if it has not been set
      • setDeviceLocale

        public void setDeviceLocale(java.util.Locale deviceLocale)
        Sets the preferred device locale.

        This will be the locale that is preferred when requesting content from your Zendesk. Please note that the preferred locale may not be available in your Zendesk and the actual locale that is used will be specified in HelpCenterSettings.getLocale()

        Parameters:
        deviceLocale - the preferred device locale
      • refreshRequest

        public boolean refreshRequest(java.lang.String requestId,
                                      Context context)
        Refreshes the Support SDK RequestActivity if it is currently being displayed (after Activity#onResume() but before Activity#onPause()) for the given request ID, or the RequestListActivity if it has not been destroyed (ie, by Activity#onDestroy(). This is intended for use in the handling of push notifications for updates on Zendesk Support requests. If not using push notifications, or using a provider-only integration (ie, not using the Support SDK UI), then this method should not be used. The method should be called from the android.content.BroadcastReceiver being used to receive your push notifications. If the Support SDK UI is currently on screen, this method will trigger a refresh to capture the update, and return true. If it is not on screen, this method will return false. We recommend showing a notification to the user only if this method returns false.
        Parameters:
        requestId - the ID of the request to refresh
        context - the application Context
        Returns:
        true if the conversation UI was refreshed on screen, false if not.
      • getSupportModule

        public SupportModule getSupportModule()
        Only for internal use.
        Here be dragons