Interface Alert


public interface Alert
Object that represents an alert.

Alerts are raised at run-time when particular conditions are met, for example
bad network quality. The full list of available alert types is described by the
Alert.Type enum. An application is notified of new alerts through the CoreListener
interface. Once raised, the application may use the AlertListener
interface to get notified when the alert stops. For each kind of alert, a
Dictionary is filled with relevant informations, returned by getInformations()
. The keys available are documented per-type in Alert.Type enum.
  • Method Details

    • getCall

      @NonNull Call getCall()
      Return the call from the alert.

      Returns:
      A Call from the alert.
    • getEndTime

      long getEndTime()
      Return the end time of the alert.

      Returns:
      the end time of the alert.
    • getInformations

      @Nullable Dictionary getInformations()
      Return more informations about the alerts.

      Returns:
      A Dictionary containing informations about the current alert.
    • getStartTime

      long getStartTime()
      Return the start time of the alert.

      Returns:
      the start time of the alert.
    • getState

      boolean getState()
      Return the state of the alert.

      Returns:
      true if and only if the alert is active.
    • getType

      Alert.Type getType()
      Return the type of the alert.

      Returns:
      A Alert.Type corresponding to the current alert.
    • clone

      @NonNull Alert clone()
      Clone the given alert.

      Returns:
      A new alert with exactly same informations that param.
    • notifyOnTerminated

      void notifyOnTerminated()
      Notify the alert if it is terminated.

    • typeToString

      String typeToString(Alert.Type type)
      Provide a string describing the alert type.

      Parameters:
      type - the Alert.Type
      Returns:
      a string
    • addListener

      void addListener(AlertListener listener)
    • removeListener

      void removeListener(AlertListener listener)
    • setUserData

      void setUserData(Object data)
      Sets the object to store in this object user's data
      Parameters:
      data - the object to store
    • getUserData

      Object getUserData()
      Gets the object stored in this object user's data
      Returns:
      the object store if any, null otherwise
    • getNativePointer

      long getNativePointer()
      Gets the native pointer used by this class to make native method calls.
      Returns:
      the nativer pointer, as long
    • toString

      String toString()
      Overrides:
      toString in class Object