Class SafeMobileSettings



  • public class SafeMobileSettings
    extends java.lang.Object
    Wraps MobileSettings and makes settings call null-safe.

    This class will generally default to false or 0 for return values if they don't exist.

    Created by Zendesk on 28/07/15.
    • Constructor Detail

      • SafeMobileSettings

        public SafeMobileSettings(MobileSettings mobileSettings)
        Creates an instance of SafeMobileSettings
        Parameters:
        mobileSettings - The mobile settings to wrap
    • Method Detail

      • isConversationsEnabled

        public boolean isConversationsEnabled()
        Checks if conversations are enabled or not
        Returns:
        true only if conversations are enabled, false if they are not or the settings are missing
      • isAttachmentsEnabled

        public boolean isAttachmentsEnabled()
        Checks if attachments are enabled or not
        Returns:
        true only if they are enabled, false if they are not or the settings are missing
      • getMaxAttachmentSize

        public long getMaxAttachmentSize()
        Gets the maximum attachment size allowed in bytes
        Returns:
        The maximum attachment size allowed in bytes, or 0 if the settings are missing
      • hasHelpCenterSettings

        public boolean hasHelpCenterSettings()
        Checks if we have Help Center settings or not.
        Returns:
        true if we have a non-null HelpCenterSettings, false if not.
      • isHelpCenterEnabled

        public boolean isHelpCenterEnabled()
        Checks if help center is enabled or not.
        Returns:
        true only if help center is enabled, false if it is not or if the settings are missing
      • getHelpCenterLocale

        public java.lang.String getHelpCenterLocale()
        Gets the default locale of the help center
        Returns:
        the default locale of the help center, or the empty string if the settings are missing
      • getAuthenticationType

        public AuthenticationType getAuthenticationType()
        Gets the authentication type.
        Returns:
        The authentication type, or null if we don't have one.
      • getHelpCenterSettings

        public HelpCenterSettings getHelpCenterSettings()
        Gets the help center settings

        mobileSettings.getSdkSettings() is NonNull but let's check it anyway, in case that is changed.

        Returns:
        the HelpCenterSettings if we have them, null otherwise
      • getContactZendeskTags

        public java.util.List<java.lang.String> getContactZendeskTags()
        Gets the tags to use for the ContactZendesk components.
      • isTicketFormSupportAvailable

        public boolean isTicketFormSupportAvailable()
        Gets if TicketForm support is available, or not.
        Returns:
        true if TicketForm support is available, false if not.
      • isPathfinderEnabled

        public boolean isPathfinderEnabled()
        Gets if blips are enabled for Pathfinder or not.
        Returns:
        true if Pathfinder support is enabled, or false if not.