語言

AppSearchSession.ReportUsage(ReportUsageRequest, IExecutor, IConsumer) 方法

定義

依命名空間與 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 會更新該文件的使用次數與使用最新度指標。 這些指標用於排序 #search 結果 SearchSpec#RANKING_STRATEGY_USAGE_COUNT 及 SearchSpec#RANKING_STRATEGY_USAGE_LAST_USED_TIMESTAMP 排名策略。

報告文件使用情況是可選的。

Java 文件 android.app.appsearch.AppSearchSession.reportUsage(android.app.appsearch.ReportUsageRequest, java.util.concurrent.Executor, java.util.function.Consumer<android.app.appsearch.AppSearchResult<java.lang.Void>>)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於