Prompt
class Prompt : Parcelable
A set of voice prompts to use with the voice interaction system to confirm an action, select an option, or do similar operations. Multiple voice prompts may be provided for variety. A visual prompt must be provided, which might not match the spoken version. For example, the confirmation "Are you sure you want to purchase this item?" might use a visual label like "Purchase item".
Summary
Inherited constants |
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents() : indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel : the object being written is a return value, that is the result of a function such as "Parcelable someFunction() ", "void someFunction(out Parcelable) ", or "void someFunction(inout Parcelable) ". Some implementations may want to release resources at this point.
|
|
Public constructors |
Constructs a prompt set with single prompt used for all interactions.
|
Constructs a prompt set.
|
Public methods |
open Int |
Returns the number of different voice prompts.
|
open Int |
|
open CharSequence |
Returns the prompt to use for visual display.
|
open CharSequence |
Returns a prompt to use for voice interactions.
|
open String |
|
open Unit |
|
Public constructors
Prompt
Prompt(prompt: CharSequence)
Constructs a prompt set with single prompt used for all interactions. This is most useful in test apps. Non-trivial apps should prefer the detailed constructor.
Prompt
Prompt(
voicePrompts: Array<CharSequence!>,
visualPrompt: CharSequence)
Constructs a prompt set.
Parameters |
voicePrompts |
Array<CharSequence!>: An array of one or more voice prompts. Must not be empty or null. |
visualPrompt |
CharSequence: A prompt to display on the screen. Must not be null. |
Public methods
countVoicePrompts
open fun countVoicePrompts(): Int
Returns the number of different voice prompts.
describeContents
open fun describeContents(): Int
getVisualPrompt
open fun getVisualPrompt(): CharSequence
Returns the prompt to use for visual display.
getVoicePromptAt
open fun getVoicePromptAt(index: Int): CharSequence
Returns a prompt to use for voice interactions.
toString
open fun toString(): String
Return |
String |
a string representation of the object. |
writeToParcel
open fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Properties