次の方法で共有


ShortcutManager.ReportShortcutUsed(String) Method

Definition

Apps that publish shortcuts should call this method whenever the user selects the shortcut containing the given ID or when the user completes an action in the app that is equivalent to selecting the shortcut.

[Android.Runtime.Register("reportShortcutUsed", "(Ljava/lang/String;)V", "GetReportShortcutUsed_Ljava_lang_String_Handler", ApiSince=25)]
public virtual void ReportShortcutUsed (string? shortcutId);
[<Android.Runtime.Register("reportShortcutUsed", "(Ljava/lang/String;)V", "GetReportShortcutUsed_Ljava_lang_String_Handler", ApiSince=25)>]
abstract member ReportShortcutUsed : string -> unit
override this.ReportShortcutUsed : string -> unit

Parameters

shortcutId
String
Attributes

Remarks

Apps that publish shortcuts should call this method whenever the user selects the shortcut containing the given ID or when the user completes an action in the app that is equivalent to selecting the shortcut. For more details, read about

tracking shortcut usage.

The information is accessible via UsageStatsManager#queryEvents Typically, launcher apps use this information to build a prediction model so that they can promote the shortcuts that are likely to be used at the moment.

Java documentation for android.content.pm.ShortcutManager.reportShortcutUsed(java.lang.String).

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