次の方法で共有


RecognizerIntent.ActionWebSearch Field

Definition

Starts an activity that will prompt the user for speech, send it through a speech recognizer, and either display a web search result or trigger another type of action based on the user's speech.

[Android.Runtime.Register("ACTION_WEB_SEARCH")]
public const string ActionWebSearch;
[<Android.Runtime.Register("ACTION_WEB_SEARCH")>]
val mutable ActionWebSearch : string

Field Value

Attributes

Remarks

Starts an activity that will prompt the user for speech, send it through a speech recognizer, and either display a web search result or trigger another type of action based on the user's speech.

If you want to avoid triggering any type of action besides web search, you can use the #EXTRA_WEB_SEARCH_ONLY extra.

Required extras: <ul> <li>#EXTRA_LANGUAGE_MODEL</ul>

Optional extras: <ul> <li>#EXTRA_PROMPT<li>#EXTRA_LANGUAGE<li>#EXTRA_MAX_RESULTS<li>#EXTRA_PARTIAL_RESULTS<li>#EXTRA_WEB_SEARCH_ONLY<li>#EXTRA_ORIGIN</ul>

Result extras (returned in the result, not to be specified in the request): <ul> <li>#EXTRA_RESULTS<li>#EXTRA_CONFIDENCE_SCORES (optional) </ul>

NOTE: There may not be any applications installed to handle this action, so you should make sure to catch ActivityNotFoundException.

Java documentation for android.speech.RecognizerIntent.ACTION_WEB_SEARCH.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to