Interface for an Activity to interact with the user through voice. Use
Activity.getVoiceInteractor
to retrieve the interface, if the activity is currently involved in a voice interaction.
Once a request is submitted, the voice system will process it and eventually deliver
the result to the request object. The application can cancel a pending request at any
time.
The VoiceInteractor is integrated with Activity's state saving mechanism, so that
if an activity is being restarted with retained state, it will retain the current
VoiceInteractor and any outstanding requests. Because of this, you should always use
Request.getActivity to get back to the activity of a
request, rather than holding on to the activity instance yourself, either explicitly
or implicitly through a non-static inner class.
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
Queries the supported commands available from the VoiceInteractionService.
The command is a string that describes the generic operation to be performed.
An example might be "org.example.commands.PICK_DATE" to ask the user to pick
a date. (Note: This is not an actual working example.)
Parameters
commands
String: The array of commands to query for support.
Returns
boolean[]
Array of booleans indicating whether each command is supported or not.
This site uses cookies to store your preferences for site-specific language and display options.
Get the latest Android developer news and tips that will help you find success on Google Play.
* Required Fields
Hooray!
You have successfully signed up for the latest Android developer news and tips.
Browse this site in ?
This class requires API level or higher
This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.