Partager via


RecognizerIntent.GetVoiceDetailsIntent(Context) Method

Definition

Returns the broadcast intent to fire with Context#sendOrderedBroadcast(Intent, String, BroadcastReceiver, android.os.Handler, int, String, Bundle) to receive details from the package that implements voice search.

[Android.Runtime.Register("getVoiceDetailsIntent", "(Landroid/content/Context;)Landroid/content/Intent;", "")]
public static Android.Content.Intent? GetVoiceDetailsIntent (Android.Content.Context? context);
[<Android.Runtime.Register("getVoiceDetailsIntent", "(Landroid/content/Context;)Landroid/content/Intent;", "")>]
static member GetVoiceDetailsIntent : Android.Content.Context -> Android.Content.Intent

Parameters

context
Context

a context object

Returns

the broadcast intent to fire or null if not available

Attributes

Remarks

Returns the broadcast intent to fire with Context#sendOrderedBroadcast(Intent, String, BroadcastReceiver, android.os.Handler, int, String, Bundle) to receive details from the package that implements voice search.

This is based on the value specified by the voice search Activity in #DETAILS_META_DATA, and if this is not specified, will return null. Also if there is no chosen default to resolve for #ACTION_WEB_SEARCH, this will return null.

If an intent is returned and is fired, a Bundle of extras will be returned to the provided result receiver, and should ideally contain values for #EXTRA_LANGUAGE_PREFERENCE and #EXTRA_SUPPORTED_LANGUAGES.

(Whether these are actually provided is up to the particular implementation. It is recommended that Activitys implementing #ACTION_WEB_SEARCH provide this information, but it is not required.)

Java documentation for android.speech.RecognizerIntent.getVoiceDetailsIntent(android.content.Context).

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