Freigeben über


RecognizerIntent.ActionVoiceSearchHandsFree Field

Definition

Starts an activity that will prompt the user for speech without requiring the user's visual attention or touch input.

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

Field Value

Attributes

Remarks

Starts an activity that will prompt the user for speech without requiring the user's visual attention or touch input. It will send it through a speech recognizer, and either synthesize speech for a web search result or trigger another type of action based on the user's speech.

This activity may be launched while device is locked in a secure mode. Special care must be taken to ensure that the voice actions that are performed while hands free cannot compromise the device's security. The activity should check the value of the #EXTRA_SECURE extra to determine whether the device has been securely locked. If so, the activity should either restrict the set of voice actions that are permitted or require some form of secure authentication before proceeding.

To ensure that the activity's user interface is visible while the lock screen is showing, the activity should set the android.view.WindowManager.LayoutParams#FLAG_SHOW_WHEN_LOCKED window flag. Otherwise the activity's user interface may be hidden by the lock screen. The activity should take care not to leak private information when the device is securely locked.

Optional extras: <ul> <li>#EXTRA_SECURE</ul>

<p class="note"> In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Java documentation for android.speech.RecognizerIntent.ACTION_VOICE_SEARCH_HANDS_FREE.

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