public final class

SosConfiguration

extends Object
implements Serializable
java.lang.Object
   ↳ com.salesforce.android.sos.api.SosConfiguration

Class Overview

Configuration class for SOS sessions.

Instances of this class can be used to configure behavior within the SOS SDK.

Summary

Nested Classes
class SosConfiguration.Builder Builder for SosConfiguration instances. 
Constants
int DEFAULT_CAMERA_FPS The default number of frames to capture per second when sharing the front or back facing camera.
int DEFAULT_SCREEN_SHARE_FPS The default number of frames to capture per second when sharing the screen.
String INTENT_TAG The tag used in the Intent to start the SOS service.
int MAX_ONBOARDING_CARDS The maximum number of onboarding cards allowed.
Fields
public static final SosConfiguration DEFAULT_CONFIGURATION The default configuration is used when no custom configuration is specified when starting an SOS session.
Public Methods
static SosConfiguration.Builder builder()
Create a builder for building SosConfiguration instances.
int getAgentJoinSoundResourceId()
Returns the resource ID of the agent join sound.
Uri getAgentJoinSoundUri()
Returns the URI for the agent join sound.
String getAssetTtf()
Returns the custom typefaceFromAsset flag.
int getCameraFps()
Return the FPS value for sharing the front or back facing camera.
int getDefaultContainerPosition()
Return an IntDef that represents where the agent container should initially be placed.
SosShareType getDefaultShareType()
Returns the default share type for SOS sessions.
long getEndSessionTimeout()
Returns the length of time a disconnected session will wait for a reconnect before giving up.
Integer[] getOnboardingCardLayouts()
Return the layout IDs to be inflated and displayed within the onboarding carousel.
int getScreenCaptureFps()
Return the FPS value for sharing the screen.
long getSessionRetryTime()
Returns the length of time to wait before asking a user to retry or quit when trying to start a session (for example, will be fired if no agent answers the call)
boolean isAgentPublish()
Returns the agent publish enabled flag.
boolean isAgentViewDpScaled()
Returns the agent view DP scaled flag.
boolean isAudioAllowed()
Returns the audio allowed flag.
boolean isBackFacingCameraEnabled()
Returns the back-facing camera flag.
boolean isConnectingUiEnabled()
Return whether or not the default SOS UI should be presented during the connecting phase of the session.
boolean isFieldServicesEnabled()
Returns the Field Services flag.
boolean isFrontFacingCameraEnabled()
Returns the front-facing camera flag.
boolean isKeepScreenOn()
Return whether or not the screen should always remain on during the SOS session.
boolean isLoggingEnabled()
Returns the logging-enabled flag.
boolean isNetworkTestEnabled()
Returns the network test enabled flag.
boolean isOnboardingUiEnabled()
Checks if the onboarding UI is enabled.
boolean isPermissionUiEnabled()
Checks if the permission UI is enabled.
boolean isPlaySoundsEnabled()
Returns the flag for whether or not sounds will be played.
boolean isToastDisabled(SosToast toast)
Checks if a given toast was disabled when starting the session.
boolean isTwoWayVideoEnabled()
Returns the Two-way Video flag.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int DEFAULT_CAMERA_FPS

The default number of frames to capture per second when sharing the front or back facing camera.

Constant Value: 15 (0x0000000f)

public static final int DEFAULT_SCREEN_SHARE_FPS

The default number of frames to capture per second when sharing the screen.

Constant Value: 7 (0x00000007)

public static final String INTENT_TAG

The tag used in the Intent to start the SOS service.

Constant Value: "com.salesforce.android.sos.api.SosConfiguration"

public static final int MAX_ONBOARDING_CARDS

The maximum number of onboarding cards allowed. Currently set to 6.

Constant Value: 6 (0x00000006)

Fields

public static final SosConfiguration DEFAULT_CONFIGURATION

The default configuration is used when no custom configuration is specified when starting an SOS session.

Public Methods

public static SosConfiguration.Builder builder ()

Create a builder for building SosConfiguration instances.

Returns
  • A new builder that can be used to create SosConfiguration instances.

public int getAgentJoinSoundResourceId ()

Returns the resource ID of the agent join sound.

Returns
  • Resource ID for the agent join sound.

public Uri getAgentJoinSoundUri ()

Returns the URI for the agent join sound.

Returns
  • URI for the agent join sound.

public String getAssetTtf ()

Returns the custom typefaceFromAsset flag.

Returns
  • The custom typefaceFromAsset, system default if not set.

public int getCameraFps ()

Return the FPS value for sharing the front or back facing camera.

Returns
  • The camera capture FPS.

public int getDefaultContainerPosition ()

Return an IntDef that represents where the agent container should initially be placed.

Returns
  • the IntDef.

public SosShareType getDefaultShareType ()

Returns the default share type for SOS sessions.

Returns
  • Default share type
See Also

public long getEndSessionTimeout ()

Returns the length of time a disconnected session will wait for a reconnect before giving up.

Returns
  • the length of time in ms.

public Integer[] getOnboardingCardLayouts ()

Return the layout IDs to be inflated and displayed within the onboarding carousel.

Returns
  • Array of layout IDs.

public int getScreenCaptureFps ()

Return the FPS value for sharing the screen.

Returns
  • The screen share capture FPS.

public long getSessionRetryTime ()

Returns the length of time to wait before asking a user to retry or quit when trying to start a session (for example, will be fired if no agent answers the call)

public boolean isAgentPublish ()

Returns the agent publish enabled flag.

Returns
  • True if the agent publish is enabled, false if disabled.

public boolean isAgentViewDpScaled ()

Returns the agent view DP scaled flag.

Returns
  • True if DP scaling is on for the agent view.

public boolean isAudioAllowed ()

Returns the audio allowed flag.

Returns
  • True if audio is allowed in the session, false if disallowed.
See Also

public boolean isBackFacingCameraEnabled ()

Returns the back-facing camera flag.

Returns
  • True if the back-facing camera is enabled.

public boolean isConnectingUiEnabled ()

Return whether or not the default SOS UI should be presented during the connecting phase of the session.

Returns
  • True if the default UI should be shown during the connecting phase.

public boolean isFieldServicesEnabled ()

Returns the Field Services flag.

Returns
  • True if Field Services is enabled.

public boolean isFrontFacingCameraEnabled ()

Returns the front-facing camera flag.

Returns
  • True if the front-facing camera is enabled.

public boolean isKeepScreenOn ()

Return whether or not the screen should always remain on during the SOS session.

Returns
  • boolean indicating whether or not the screen should remain on.

public boolean isLoggingEnabled ()

Returns the logging-enabled flag.

Returns
  • True if logging is enabled;

public boolean isNetworkTestEnabled ()

Returns the network test enabled flag.

Returns
  • True if network testing is enabled.

public boolean isOnboardingUiEnabled ()

Checks if the onboarding UI is enabled. If disabled, the UI will be skipped completely when starting a session.

Returns
  • True if the onboarding UI is enabled.

public boolean isPermissionUiEnabled ()

Checks if the permission UI is enabled. If disabled, the app is responsible for ensuring all required permissions are granted prior to starting the session. The permissions UI is only shown for Android Marshmallow and later devices.

Returns
  • True if the permission UI is enabled.

public boolean isPlaySoundsEnabled ()

Returns the flag for whether or not sounds will be played.

Returns
  • True if sounds are enabled

public boolean isToastDisabled (SosToast toast)

Checks if a given toast was disabled when starting the session. Toasts that are disabled are not shown by the SDK.

Parameters
toast The toast to check.
Returns
  • True if the toast is disabled, false otherwise.

public boolean isTwoWayVideoEnabled ()

Returns the Two-way Video flag.

Returns
  • True if Two-way Video is enabled.