Class Settings


  • public class Settings
    extends java.lang.Object
    The settings used to initialise the SDK.
    • Constructor Summary

      Constructors 
      Constructor Description
      Settings​(java.lang.String integrationId)
      Initializes a Settings with the given app id and integration id.
      Settings​(java.lang.String integrationId, java.lang.String authCode)
      Initializes a Settings instance with the given app id, integration id and auth code flag.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAuthCode()
      The auth code being used to authenticate as an existing user.
      AuthenticationDelegate getAuthenticationDelegate()
      A delegate to be notified about a failed request due to invalid credentials.
      java.lang.String getFileProviderAuthorities()
      A String that signifies which authority Smooch will use to provide files to the CAMERA application.
      java.lang.String getIntegrationId()
      The integration id corresponding to your SDK integration.
      java.lang.String getMapsApiKey()
      Google Maps API key to use to display a location preview for Location messages.
      java.lang.String getRegion()
      A String that determines which region to connect to.
      java.lang.String getServiceBaseUrl()  
      boolean isFirebaseCloudMessagingAutoRegistrationEnabled()
      A boolean property that indicates whether Smooch should manage the Firebase Cloud Messaging registration.
      void setAuthenticationDelegate​(AuthenticationDelegate authenticationDelegate)
      A delegate to be notified about a failed request due to invalid credentials.
      void setFileProviderAuthorities​(java.lang.String fileProviderAuthorities)
      A String that signifies which authority Smooch will use to provide files to the CAMERA application.
      void setFirebaseCloudMessagingAutoRegistrationEnabled​(boolean isEnabled)
      A boolean property that indicates whether Smooch should manage the Firebase Cloud Messaging registration.
      void setMapsApiKey​(java.lang.String mapsApiKey)
      Google Maps API key to use to display a location preview for Location messages.
      void setRegion​(java.lang.String region)
      A String that determines which region to connect to.
      void setServiceBaseUrl​(java.lang.String serviceBaseUrl)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Settings

        public Settings​(java.lang.String integrationId)
        Initializes a Settings with the given app id and integration id.
        Parameters:
        integrationId - A valid integration id retrieved from the Smooch web portal
      • Settings

        public Settings​(java.lang.String integrationId,
                        java.lang.String authCode)
        Initializes a Settings instance with the given app id, integration id and auth code flag.
        Parameters:
        integrationId - A valid integration id retrieved from the Smooch web portal
        authCode - A valid auth code retrieved from the Smooch API to authenticate as an existing user
    • Method Detail

      • getIntegrationId

        public java.lang.String getIntegrationId()
        The integration id corresponding to your SDK integration.

        Integrations id are issued on the Smooch web portal. This value may only be set once, and must be set at init time.

        Returns:
        the integration id
      • getAuthCode

        public java.lang.String getAuthCode()
        The auth code being used to authenticate as an existing user.

        An auth code can be retrieved from the Smooch API. This value may only be set once, and must be set at init time.

        Returns:
        the auth code if provided on init, null otherwise
      • isFirebaseCloudMessagingAutoRegistrationEnabled

        public boolean isFirebaseCloudMessagingAutoRegistrationEnabled()
        A boolean property that indicates whether Smooch should manage the Firebase Cloud Messaging registration.

        The default value is true.

        Returns:
        true if Firebase Cloud Messaging auto registration is enabled, false otherwise
      • setFirebaseCloudMessagingAutoRegistrationEnabled

        public void setFirebaseCloudMessagingAutoRegistrationEnabled​(boolean isEnabled)
        A boolean property that indicates whether Smooch should manage the Firebase Cloud Messaging registration.

        The default value is true.

        Parameters:
        isEnabled - if Firebase Cloud Messaging auto registration should be enabled
      • getFileProviderAuthorities

        public java.lang.String getFileProviderAuthorities()
        A String that signifies which authority Smooch will use to provide files to the CAMERA application.

        This should only be set when you have a provider defined in your AndroidManifest.

        Returns:
        the authorities string
      • setFileProviderAuthorities

        public void setFileProviderAuthorities​(java.lang.String fileProviderAuthorities)
        A String that signifies which authority Smooch will use to provide files to the CAMERA application.

        This need only be set when you have a provider defined in the AndroidManifest.

        Parameters:
        fileProviderAuthorities - the authorities string set in your provider tag
      • getMapsApiKey

        public java.lang.String getMapsApiKey()
        Google Maps API key to use to display a location preview for Location messages. If null or empty, a text representation of the location is shown instead.
        Returns:
        the Google Maps API key
      • setMapsApiKey

        public void setMapsApiKey​(java.lang.String mapsApiKey)
        Google Maps API key to use to display a location preview for Location messages. If null or empty, a text representation of the location is shown instead.
        Parameters:
        mapsApiKey - the Google Maps API key
      • getServiceBaseUrl

        public java.lang.String getServiceBaseUrl()
      • setServiceBaseUrl

        public void setServiceBaseUrl​(java.lang.String serviceBaseUrl)
      • getRegion

        public java.lang.String getRegion()
        A String that determines which region to connect to.
        Returns:
        the region identifier
      • setRegion

        public void setRegion​(java.lang.String region)
        A String that determines which region to connect to.

        Leave unspecified to use the default region (US). Set to "eu-1" to use the EU region.

        Parameters:
        region - the region identifier
      • setAuthenticationDelegate

        public void setAuthenticationDelegate​(AuthenticationDelegate authenticationDelegate)
        A delegate to be notified about a failed request due to invalid credentials.
        Parameters:
        authenticationDelegate - an implementation of AuthenticationDelegate