reportShortcutUsed

open fun reportShortcutUsed(@NonNull context: Context, @NonNull shortcutId: String)(source)

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 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.

Throws

when the user is locked.

This method is not supported on devices running SDK <25 since the platform class will not be available.