StorageStrategy

@Serializable
enum StorageStrategy : Enum<StorageStrategy>

Defines how the launcher should store search results from a plugin (i.e. when the search result is added to favorites).

Entries

Link copied to clipboard
@SerialName(value = "ref")
StoreReference

The launcher only stores the ID of the search result, and the plugin that created it. To restore a result, the plugin is queried again. This allows the plugin to update key fields (i.e. the label) immediately. However, plugins that use this strategy must guarantee, that they can restore a search result at any time, in a timely manner. In particular, the plugin must be able to restore a search result without any network requests. This strategy is best suited for on-device search plugins.

Link copied to clipboard
@SerialName(value = "copy")
StoreCopy

The launcher stores all relevant information about this search result in its own internal database. The result can be restored without querying the plugin again. The launcher will try refresh the search result at its own discretion (e.g. when a user long-presses a restored search result to view its details). This strategy is the default and should be used whenever the plugin can't restore a search result immediately. It is best suited for online search plugins.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.