AppSearchSession.ReportUsage(ReportUsageRequest, IExecutor, IConsumer) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
按命名空间和 ID 报告特定文档的使用情况。
[Android.Runtime.Register("reportUsage", "(Landroid/app/appsearch/ReportUsageRequest;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=31)]
public void ReportUsage(Android.App.AppSearch.ReportUsageRequest request, Java.Util.Concurrent.IExecutor executor, Java.Util.Functions.IConsumer callback);
[<Android.Runtime.Register("reportUsage", "(Landroid/app/appsearch/ReportUsageRequest;Ljava/util/concurrent/Executor;Ljava/util/function/Consumer;)V", "", ApiSince=31)>]
member this.ReportUsage : Android.App.AppSearch.ReportUsageRequest * Java.Util.Concurrent.IExecutor * Java.Util.Functions.IConsumer -> unit
参数
- request
- ReportUsageRequest
使用情况报告请求。
- executor
- IExecutor
要对其调用回调的执行程序。
- callback
- IConsumer
用于接收错误的回调。 如果操作成功,将调用回调。null
- 特性
注解
按命名空间和 ID 报告特定文档的使用情况。
使用情况报告表示用户与之交互或查看文档的事件。
对于每次调用 #reportUsage,AppSearch 都会更新该特定文档的使用情况计数和使用情况回顾性指标。 这些指标用于按SearchSpec#RANKING_STRATEGY_USAGE_COUNT排名SearchSpec#RANKING_STRATEGY_USAGE_LAST_USED_TIMESTAMP策略对结果进行#search排序。
报告文档的使用情况是可选的。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。