public final enum

SosToast

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.salesforce.android.sos.api.SosToast

Class Overview

Enumeration of the various Toasts that are shown by the SOS framework during a session.

These toasts may be selectively disabled via the disableToasts(EnumSet) API, or their content can be changed by overriding the listed string resource in your application's resource folder.

Usage Example

   
     // Completely disable all toasts shown during the session.
     SosConfiguration config = SosConfiguration.builder().disableToasts(SosToast.SET_ALL).build();

     // Disable all toasts that are shown when the session ends.
     SosConfiguration config = SosConfiguration.builder().disableToasts(SosToast.SET_END_SESSION).build();

     // Disable only the toast that is shown when the user ends the session.
     EnumSet<SosToast> set = EnumSet.of(SosToast.END_SESSION_LOCAL);
     SosConfiguration config = SosConfiguration.builder().disableToasts(set).build();
   
 

Summary

Enum Values
SosToast  END_SESSION_CONNECTION_TIMEOUT  Shown whenever part of the connection process fails to connect, or fails to recover after a disconnection. 
SosToast  END_SESSION_ERROR  Shown when a session ends due to an encountered error. 
SosToast  END_SESSION_INSUFFICIENT_NETWORK  Shown when a session ends due to a failed network test. 
SosToast  END_SESSION_LOCAL  Shown when the session is explicitly ended by the agent. 
SosToast  END_SESSION_NETWORK_LOST  Shown when a session ends due to a lost network. 
SosToast  END_SESSION_NO_AGENTS  Shown when a session ends due to there being no agents available to accept the session. 
SosToast  END_SESSION_REMOTE  Shown when the session is explicitly ended by the agent. 
SosToast  END_SESSION_TIMEOUT  Shown when a session ends due to the video connection timing out. 
SosToast  END_SESSION_UNKNOWN  Shown when a session ends for an unknown reason. 
SosToast  MASKED_FIELDS_EXPOSED  Shown when one or more masked fields are exposed during an SOS session. 
SosToast  MASKED_FIELDS_HIDDEN  Shown when all masked fields are re-hidden during an SOS session. 
SosToast  POOR_NETWORK  Shown when the connection to the agent degrades enough that it may be impacting the SOS experience. 
SosToast  SESSION_OFF_HOLD  Shown when an SOS session resumes after being on hold, e.g. 
SosToast  SESSION_ON_HOLD  Shown when an SOS session goes on hold, e.g. 
SosToast  UNEXPECTED_CAMERA_ERROR  Shown if an unexpected error prevents the user from accessing their camera during an SOS session. 
Fields
public static final EnumSet<SosToast> SET_ALL An EnumSet of all the toasts shown during an SOS session.
public static final EnumSet<SosToast> SET_END_SESSION An EnumSet of all of the toasts shown at the end of an SOS session.
public static final EnumSet<SosToast> SET_ERRORS An EnumSet of the toasts shown when an error has occurred.
public static final EnumSet<SosToast> SET_FIELD_MASKING An EnumSet of all the toasts relating to field masking.
public static final EnumSet<SosToast> SET_SESSION_HOLD An EnumSet of the toasts shown when a session goes on or off hold.
Public Methods
int getResourceId()
Retrieves the resource ID associated with this SosToast instance.
boolean isErrorToast()
static SosToast valueOf(String name)
final static SosToast[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final SosToast END_SESSION_CONNECTION_TIMEOUT

Shown whenever part of the connection process fails to connect, or fails to recover after a disconnection. This particular state is used as a catch-all if a particular error case is not covered by something else. Displays the string sos_end_session_connection_timeout. This toast corresponds to ConnectionTimeout

public static final SosToast END_SESSION_ERROR

Shown when a session ends due to an encountered error. Displays the string sos_end_reason_error. This toast corresponds to Error.

public static final SosToast END_SESSION_INSUFFICIENT_NETWORK

Shown when a session ends due to a failed network test. Displays the string sos_end_session_insufficient_network. This toast corresponds to InsufficientNetwork.

public static final SosToast END_SESSION_LOCAL

Shown when the session is explicitly ended by the agent. Displays the string sos_end_session_local. This toast corresponds to Local.

public static final SosToast END_SESSION_NETWORK_LOST

Shown when a session ends due to a lost network. Displays the string sos_end_reason_network_lost. This toast corresponds to NetworkLost.

public static final SosToast END_SESSION_NO_AGENTS

Shown when a session ends due to there being no agents available to accept the session. Displays the string sos_end_session_no_agent. This toast corresponds to NoAgent.

public static final SosToast END_SESSION_REMOTE

Shown when the session is explicitly ended by the agent. Displays the string sos_end_session_remote. This toast corresponds to Remote.

public static final SosToast END_SESSION_TIMEOUT

Shown when a session ends due to the video connection timing out. Displays the string sos_end_session_timeout. This toast corresponds to Timeout.

public static final SosToast END_SESSION_UNKNOWN

Shown when a session ends for an unknown reason. Displays the string sos_end_reason_unknown. There is no corresponding SosEndReason for this toast.

public static final SosToast MASKED_FIELDS_EXPOSED

Shown when one or more masked fields are exposed during an SOS session. Displays the string sos_masking_sharing_paused.

public static final SosToast MASKED_FIELDS_HIDDEN

Shown when all masked fields are re-hidden during an SOS session. Displays the string sos_masking_sharing_resumed.

public static final SosToast POOR_NETWORK

Shown when the connection to the agent degrades enough that it may be impacting the SOS experience. Displays the string sos_ui_status_network_poor.

public static final SosToast SESSION_OFF_HOLD

Shown when an SOS session resumes after being on hold, e.g. during a phone call. Displays the string sos_session_off_hold.

public static final SosToast SESSION_ON_HOLD

Shown when an SOS session goes on hold, e.g. if a phone call is received during an SOS session. Displays the string sos_session_on_hold.

public static final SosToast UNEXPECTED_CAMERA_ERROR

Shown if an unexpected error prevents the user from accessing their camera during an SOS session. Displays the string sos_unexpected_camera_error.

Fields

public static final EnumSet<SosToast> SET_ALL

An EnumSet of all the toasts shown during an SOS session.

public static final EnumSet<SosToast> SET_END_SESSION

An EnumSet of all of the toasts shown at the end of an SOS session.

public static final EnumSet<SosToast> SET_ERRORS

An EnumSet of the toasts shown when an error has occurred.

public static final EnumSet<SosToast> SET_FIELD_MASKING

An EnumSet of all the toasts relating to field masking.

public static final EnumSet<SosToast> SET_SESSION_HOLD

An EnumSet of the toasts shown when a session goes on or off hold.

Public Methods

public int getResourceId ()

Retrieves the resource ID associated with this SosToast instance.

Returns
  • The resource ID for the string that is shown as the message for this Toast.

public boolean isErrorToast ()

public static SosToast valueOf (String name)

public static final SosToast[] values ()