Playing output to the caller

The play() method of the Call class is used to play output to the caller without expecting anything back. The voice prompt cannot be interrupted by the caller. If the caller presses a key, the key is left in the buffer for the next action method (a method which uses the underlying telephony, for example Call.play()), which may or may not clear the buffer.

The media to be played can be any of the defined MediaType objects, an array of MediaType objects, or a class which implements the Playable interface.

For example:
public class InApp extends WVRApplication {
  .
  .
  .
  // Create a voice segment object for some information that you don't want your callers to
  // be able to interrupt.
  public VoiceSegment importantInfo = new VoiceSegment("App1Segments", "ImportantInfo");
  //Play the voice segment
  call.play(importantInfo);
  .
  .
  .
}