com.avaya.deskphoneservices

## Interface DeskPhoneEventListener

-     public interface DeskPhoneEventListener

  callback interface for Vantage platform events you must add this receiver element to the application manifest: `<receiver android:name="com.avaya.deskphoneservices.DeskPhoneEventsBroadcastReceiver" android:enabled="true" tools:ignore="ExportedReceiver"> <intent-filter> <action android:name="com.avaya.endpoint.action.CONFIG_CHANGED" /> <action android:name="com.avaya.endpoint.action.RESTART" /> <action android:name="com.avaya.endpoint.action.LOGIN_SIGNAL" /> <action android:name="com.avaya.endpoint.action.LOGOUT_SIGNAL" /> <action android:name="android.intent.action.MEDIA_BUTTON" /> </intent-filter> </receiver>`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `offHook(HandsetType handset)` Called when a connected handset has gone off-hook (removed from its cradle).
    `void` | `onConfigurationChange(java.lang.String configurationString, CompletionHandler configurationCompletionHandler)` New Configuration received from platform and application should process this configuration.
    `void` | `onHoldResumeEvent()` Called when double-press on hook-switch of USB handset was detected while there is some established call with USB as active transducer
    `void` | `onHook(HandsetType handset)` Called when a connected handset has gone on-hook (returned to its cradle).
    `void` | `onInitialised()` Deskphone services transitions into configured state and is ready to process application.
    `void` | `onKeyDown(HardButtonType hardButton)` key down event received from platform via MEDIA_BUTTON intent
    `void` | `onKeyUp(HardButtonType hardButton)` key up event received from platform via MEDIA_BUTTON intent
    `void` | `onLogin(java.lang.String credentialString, CompletionHandler loginCompletionHandler)` Login event received from platform.
    `void` | `onLogout()` Logout Event Received from platform
    `void` | `onRedialEvent(com.avaya.clientservices.media.AudioDevice audioDevice)` Redial button was pressed.
    `void` | `onRejectEvent()` Called when double-press on hook-switch of USB handset was detected while ringing LED was active

- - ### Method Detail

    - #### onInitialised

          void onInitialised()

      Deskphone services transitions into configured state and is ready to process application.

    - #### onConfigurationChange

          void onConfigurationChange(java.lang.String configurationString,
                                     @NonNull
                                     CompletionHandler configurationCompletionHandler)

      New Configuration received from platform and application should process this configuration. Application to signal completion using configurationCompletionHandler. Caution: If application fails to notify completion for configuration then it will not receive subsequent configurations from DeskPhone.
      Parameters:
        `configurationString` - 46XX formatted configuration buffer
        `configurationCompletionHandler` - Application to notify completion of configuration processing.

    - #### onLogin

          void onLogin(java.lang.String credentialString,
                       @NonNull
                       CompletionHandler loginCompletionHandler)

      Login event received from platform. Application to process this event.
      Parameters:
        `credentialString` - 46XX formatted credentials buffer
        `loginCompletionHandler` - Application to notify completion of login processing.

    - #### offHook

          void offHook(@NonNull
                       HandsetType handset)

      Called when a connected handset has gone off-hook (removed from its cradle).

      This usually means that the user wishes to answer or start a new call.

      Parameters:
        `handset` - Which handset went off-hook.

    - #### onHook

          void onHook(@NonNull
                      HandsetType handset)

      Called when a connected handset has gone on-hook (returned to its cradle).

      This usually means that the user wishes to end a call.

      Parameters:
        `handset` - Which handset went on-hook.

    - #### onRejectEvent

          void onRejectEvent()

      Called when double-press on hook-switch of USB handset was detected while ringing LED was active

      This usually means that the user wishes to reject a call.

    - #### onRedialEvent

          void onRedialEvent(com.avaya.clientservices.media.AudioDevice audioDevice)

      Redial button was pressed.

      Parameters:
        `audioDevice` - - device via which redial event was accepted.

    - #### onHoldResumeEvent

          void onHoldResumeEvent()

      Called when double-press on hook-switch of USB handset was detected while there is some established call with USB as active transducer

      This usually means that the user wishes to hold/resume a call.

    - #### onLogout

          void onLogout()

      Logout Event Received from platform

    - #### onKeyUp

          void onKeyUp(@NonNull
                       HardButtonType hardButton)

      key up event received from platform via MEDIA_BUTTON intent
      Parameters:
        `hardButton` - Which hard button was released

    - #### onKeyDown

          void onKeyDown(@NonNull
                         HardButtonType hardButton)

      key down event received from platform via MEDIA_BUTTON intent
      Parameters:
        `hardButton` - Which hard button was pushed