If the input should be fixed length (for example a six-digit product code), set the maximumKeys property to the number of keys you expect. The caller then simply has to key that number of digits.
If the input length can vary, set the maximumKeys property to -1, meaning “any number of keys”. Specify one or more “enter” keys by setting the delimiterKeys property to a string representing the keys that the caller can press to indicate that they have finished. As soon as the caller presses one of these keys, they are assumed to have finished. The “enter” key is not considered to be part of the input, but its value is placed in the terminationKey property of the InputResult class. To find out which key was pressed, use the InputResult.getTerminationKey() method.
public class myVoiceApp extends WVRApplication { . . . // Create the attributes object - use empty constructors so that attributes have // default values public DTMFAttributes myDTMFAtts = new DTMFAttributes(); // Then change the attributes you need myDTMFAtts.setMaximumKeys(6); myDTMFAtts.setDelimiterKeys("#"); . . . }