Class ApplicationScope



  • public class ApplicationScope
    extends java.lang.Object
    Representation of one configured SDK instance. Holding all the state and configurations.
    • Method Detail

      • getApplicationContext

        public Context getApplicationContext()
        Gets the application Context of the recent application instance.
        Returns:
        an application Context
      • getUrl

        public java.lang.String getUrl()
        Gets the Zendesk Url as String of the recent SDK configuration.
        Returns:
        the Zendesk Url as String
      • getAppId

        public java.lang.String getAppId()
        Gets the Zendesk Application Id as String of the recent SDK configuration.
        Returns:
        the Zendesk Application Id as String
      • getOAuthToken

        public java.lang.String getOAuthToken()
        Gets the Zendesk OAuth Token as String of the recent SDK configuration.
        Returns:
        the Zendesk OAuth Token as String
      • getLocale

        public java.util.Locale getLocale()
        Get the configured Locale of the recent SDK configuration.
        If no value was set Locale.getDefault() will be used.
        Returns:
        the used Locale
      • isCoppaEnabled

        public boolean isCoppaEnabled()
        Return if COPPA is enabled of the recent SDK configuration.
        If no value was set, false will be returned.
        Returns:
        true if COPPA is enabled false if not
      • isDevelopmentMode

        public boolean isDevelopmentMode()
        Return if SDK is used in a production build or development build. There is a lot of voodoo going on, it's trying its best to detect the right stage.
        Returns:
        true if SDK is used in development build false if used in production build
      • getTicketFormId

        public java.lang.Long getTicketFormId()
        Get the configured Ticket Form Id as Long of the recent SDK configuration.
        If nothing was set null will be returned.
        Returns:
        the configured Ticket Form Id as Long
      • getCustomFields

        public java.util.List<CustomField> getCustomFields()
        Get the configured Custom Fields as List of CustomField.
        If nothing was configured, an empty List will be returned.
        Returns:
        a List of CustomField
      • getUserAgentHeader

        public java.lang.String getUserAgentHeader()
        Get the configured User-Agent header as String of the recent SDK configuration.
        Returns:
        the user-agent as a String
      • newBuilder

        public com.zendesk.sdk.network.impl.ApplicationScope.Builder newBuilder()
        Returns newly created Builder with the already configured options.
        Returns:
        a new Builder