RecognitionService.OnTriggerModelDownload 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
OnTriggerModelDownload(Intent) |
请求下载识别器支持 |
OnTriggerModelDownload(Intent, AttributionSource) |
请求下载识别器支持 |
OnTriggerModelDownload(Intent, AttributionSource, IModelDownloadListener) |
请求下载识别器支持 |
OnTriggerModelDownload(Intent)
请求下载识别器支持 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
参数
- recognizerIntent
- Intent
- 属性
注解
请求下载识别器支持 recognizerIntent
。
适用于 . 的 android.speech.RecognitionService.onTriggerModelDownload(android.content.Intent)
Java 文档
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
适用于
OnTriggerModelDownload(Intent, AttributionSource)
请求下载识别器支持 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
参数
- recognizerIntent
- Intent
- attributionSource
- AttributionSource
- 属性
注解
请求下载识别器支持 recognizerIntent
。
为服务实现提供调用 AttributionSource,以便正确指责权限和带宽。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。
适用于
OnTriggerModelDownload(Intent, AttributionSource, IModelDownloadListener)
请求下载识别器支持 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
参数
- recognizerIntent
- Intent
包含要执行的识别的参数。 该意向还可能包含可选附加项,请参阅 RecognizerIntent
。
- attributionSource
- AttributionSource
调用方的属性源。
- listener
- IModelDownloadListener
接收有关模型下载请求的更新的依据。
- 属性
注解
请求下载识别器支持 recognizerIntent
。
提供对服务实现的调用 AttributionSource
,以便正确指责权限和带宽。
客户端将通过给定 ModelDownloadListener
的更新接收进度更新:
<li> 如果模型已可用, ModelDownloadListener#onSuccess()
将直接调用。 之后可以安全地使用该模型。
<li> 如果 RecognitionService
已启动下载, ModelDownloadListener#onProgress(int)
则在下载完成之前,将调用未指定次数(零或更多)。 下载完成后, ModelDownloadListener#onSuccess()
将调用。 之后可以安全地使用该模型。
<li> 如果 RecognitionService
只计划下载,但不会立即满足, ModelDownloadListener#onScheduled()
将调用。 不会对此侦听器进行进一步更新。
<li> 如果请求因网络或计划错误而随时失败, ModelDownloadListener#onError(int)
将调用。
本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。