# Class CallActionAdapter

java.lang.Object
com.codename1.call.session.CallActionAdapter

All Implemented Interfaces:
  `CallActionListener`

public class CallActionAdapter extends Object implements CallActionListener

A `CallActionListener` whose methods all do nothing, for overriding the few that matter.

Note that leaving `providerReset()` as a no-op is a real decision and usually the wrong one -- see the method on the interface.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CallActionAdapter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `answerRequested(String callId, CallAction action)`
  The user answered.
  `void`
  `audioSessionActivated(CallAudioSession session)`
  The operating system has activated the audio session.
  `void`
  `audioSessionDeactivated(String callId)`
  The operating system has taken the audio back.
  `void`
  `callEnded(String callId, CallEndReason reason)`
  The call ended for a reason that did not come from this app -- the far end hung up, or the system ended it.
  `void`
  `dtmfRequested(String callId, String digits, CallAction action)`
  The user typed on the system keypad.
  `void`
  `endRequested(String callId, CallAction action)`
  The user hung up.
  `void`
  `holdRequested(String callId, boolean held, CallAction action)`
  The user held or resumed the call, or the system did in order to give the audio to something else.
  `void`
  `muteRequested(String callId, boolean muted, CallAction action)`
  The user muted or unmuted the call.
  `void`
  `providerReset()`
  Every call this app had is gone.
  `void`
  `startCallRequested(String callId, CallHandle handle, boolean video, CallAction action)`
  The system is asking this app to place a call: the user tapped an entry in Recents, or asked a voice assistant to call somebody through this app.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### CallActionAdapter

    public CallActionAdapter()

- ## Method Details

  - ### answerRequested

    public void answerRequested(String callId, CallAction action)
    Description copied from interface: `CallActionListener`
    The user answered. Start media when `CallActionListener.audioSessionActivated(CallAudioSession)` arrives, not here.
    Specified by:
      `answerRequested` in interface `CallActionListener`

  - ### endRequested

    public void endRequested(String callId, CallAction action)
    Description copied from interface: `CallActionListener`
    The user hung up.
    Specified by:
      `endRequested` in interface `CallActionListener`

  - ### holdRequested

    public void holdRequested(String callId, boolean held, CallAction action)
    Description copied from interface: `CallActionListener`
    The user held or resumed the call, or the system did in order to give the audio to something else.
    Specified by:
      `holdRequested` in interface `CallActionListener`

  - ### muteRequested

    public void muteRequested(String callId, boolean muted, CallAction action)
    Description copied from interface: `CallActionListener`
    The user muted or unmuted the call.
    Specified by:
      `muteRequested` in interface `CallActionListener`

  - ### dtmfRequested

    public void dtmfRequested(String callId, String digits, CallAction action)
    Description copied from interface: `CallActionListener`
    The user typed on the system keypad.
    Specified by:
      `dtmfRequested` in interface `CallActionListener`

  - ### startCallRequested

    public void startCallRequested(String callId, CallHandle handle, boolean video, CallAction action)
    Description copied from interface: `CallActionListener`

    The system is asking this app to place a call: the user tapped an entry in Recents, or asked a voice assistant to call somebody through this app. No call exists yet -- report one with `Calls.reportOutgoing(String, CallHandle, String, boolean)` using the id carried here.

    Unlike every other action here, an unanswered request is failed rather than fulfilled, and the system call ends. Nothing else can place the call, so reporting success for a request the app ignored would leave it dialing for ever. An app that does not place calls on the system's behalf can leave this alone; one that does must either report the call or answer the action itself.

    Specified by:
      `startCallRequested` in interface `CallActionListener`

  - ### audioSessionActivated

    public void audioSessionActivated(CallAudioSession session)
    Description copied from interface: `CallActionListener`
    The operating system has activated the audio session. This is where media starts. See `CallAudioSession` for why it is not where the call is answered.
    Specified by:
      `audioSessionActivated` in interface `CallActionListener`

  - ### audioSessionDeactivated

    public void audioSessionDeactivated(String callId)
    Description copied from interface: `CallActionListener`
    The operating system has taken the audio back. Stop media.
    Specified by:
      `audioSessionDeactivated` in interface `CallActionListener`

  - ### callEnded

    public void callEnded(String callId, CallEndReason reason)
    Description copied from interface: `CallActionListener`
    The call ended for a reason that did not come from this app -- the far end hung up, or the system ended it.
    Specified by:
      `callEnded` in interface `CallActionListener`

  - ### providerReset

    public void providerReset()
    Description copied from interface: `CallActionListener`

    Every call this app had is gone.

    The system's call provider was reset, which happens when the user switches the app's calling off or the platform recovers from an error. Tear down media and forget every session, but do not call `CallSession.end(CallEndReason)` on them: they no longer exist as far as the system is concerned, and ending a call on a reset provider is undefined.

    An app that does not implement this leaks its media engine and shows calls that are not there.

    Specified by:
      `providerReset` in interface `CallActionListener`