Udostępnij za pośrednictwem


RecognitionService.OnTriggerModelDownload Method

Definition

Overloads

OnTriggerModelDownload(Intent)

Requests the download of the recognizer support for recognizerIntent.

OnTriggerModelDownload(Intent, AttributionSource)

Requests the download of the recognizer support for recognizerIntent.

OnTriggerModelDownload(Intent, AttributionSource, IModelDownloadListener)

Requests the download of the recognizer support for recognizerIntent.

OnTriggerModelDownload(Intent)

Requests the download of the recognizer support for recognizerIntent.

[Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Handler", ApiSince=33)]
public virtual void OnTriggerModelDownload (Android.Content.Intent recognizerIntent);
[<Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Handler", ApiSince=33)>]
abstract member OnTriggerModelDownload : Android.Content.Intent -> unit
override this.OnTriggerModelDownload : Android.Content.Intent -> unit

Parameters

recognizerIntent
Intent
Attributes

Remarks

Requests the download of the recognizer support for recognizerIntent.

Java documentation for android.speech.RecognitionService.onTriggerModelDownload(android.content.Intent).

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

OnTriggerModelDownload(Intent, AttributionSource)

Requests the download of the recognizer support for recognizerIntent.

[Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;Landroid/content/AttributionSource;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Landroid_content_AttributionSource_Handler", ApiSince=34)]
public virtual void OnTriggerModelDownload (Android.Content.Intent recognizerIntent, Android.Content.AttributionSource attributionSource);
[<Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;Landroid/content/AttributionSource;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Landroid_content_AttributionSource_Handler", ApiSince=34)>]
abstract member OnTriggerModelDownload : Android.Content.Intent * Android.Content.AttributionSource -> unit
override this.OnTriggerModelDownload : Android.Content.Intent * Android.Content.AttributionSource -> unit

Parameters

recognizerIntent
Intent
attributionSource
AttributionSource
Attributes

Remarks

Requests the download of the recognizer support for recognizerIntent.

Provides the calling AttributionSource to the service implementation so that permissions and bandwidth could be correctly blamed.

Java documentation for android.speech.RecognitionService.onTriggerModelDownload(android.content.Intent, android.content.AttributionSource).

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

OnTriggerModelDownload(Intent, AttributionSource, IModelDownloadListener)

Requests the download of the recognizer support for recognizerIntent.

[Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;Landroid/content/AttributionSource;Landroid/speech/ModelDownloadListener;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Landroid_content_AttributionSource_Landroid_speech_ModelDownloadListener_Handler", ApiSince=34)]
public virtual void OnTriggerModelDownload (Android.Content.Intent recognizerIntent, Android.Content.AttributionSource attributionSource, Android.Speech.IModelDownloadListener listener);
[<Android.Runtime.Register("onTriggerModelDownload", "(Landroid/content/Intent;Landroid/content/AttributionSource;Landroid/speech/ModelDownloadListener;)V", "GetOnTriggerModelDownload_Landroid_content_Intent_Landroid_content_AttributionSource_Landroid_speech_ModelDownloadListener_Handler", ApiSince=34)>]
abstract member OnTriggerModelDownload : Android.Content.Intent * Android.Content.AttributionSource * Android.Speech.IModelDownloadListener -> unit
override this.OnTriggerModelDownload : Android.Content.Intent * Android.Content.AttributionSource * Android.Speech.IModelDownloadListener -> unit

Parameters

recognizerIntent
Intent

contains parameters for the recognition to be performed. The intent may also contain optional extras, see RecognizerIntent.

attributionSource
AttributionSource

the attribution source of the caller.

listener
IModelDownloadListener

on which to receive updates about the model download request.

Attributes

Remarks

Requests the download of the recognizer support for recognizerIntent.

Provides the calling AttributionSource to the service implementation so that permissions and bandwidth could be correctly blamed.

Client will receive the progress updates via the given ModelDownloadListener:

<li> If the model is already available, ModelDownloadListener#onSuccess() will be called directly. The model can be safely used afterwards.

<li> If the RecognitionService has started the download, ModelDownloadListener#onProgress(int) will be called an unspecified (zero or more) number of times until the download is complete. When the download finishes, ModelDownloadListener#onSuccess() will be called. The model can be safely used afterwards.

<li> If the RecognitionService has only scheduled the download, but won't satisfy it immediately, ModelDownloadListener#onScheduled() will be called. There will be no further updates on this listener.

<li> If the request fails at any time due to a network or scheduling error, ModelDownloadListener#onError(int) will be called.

Java documentation for android.speech.RecognitionService.onTriggerModelDownload(android.content.Intent, android.content.AttributionSource, android.speech.ModelDownloadListener).

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