Indexable.Metadata.Builder

public static final class Indexable.Metadata.Builder extends Object

The builder for Indexable.Metadata.

Public Constructor Summary

Builder()
The constructor.

Public Method Summary

Indexable.Metadata.Builder
setScope(int scope)
Set the scope of the Indexable.
Indexable.Metadata.Builder
setScore(int score)
Sets the score of the object.
Indexable.Metadata.Builder
setSliceUri(Uri sliceUri)
Set the Uri of the Slice that represents this Indexable.
Indexable.Metadata.Builder
setWorksOffline(boolean worksOffline)
Sets whether the object is available offline in the app.

Inherited Method Summary

Public Constructors

public Builder ()

The constructor.

Public Methods

public Indexable.Metadata.Builder setScope (int scope)

Set the scope of the Indexable. When it is not set explicitly, the default is Scope.ON_DEVICE.

Parameters
scope It must be one of the values in Scope.

public Indexable.Metadata.Builder setScore (int score)

Sets the score of the object.

The score signifies the relative importance of this compared to other objects in the index from the app.

Parameters
score The score. The default is zero (0), negative values are not allowed.

public Indexable.Metadata.Builder setSliceUri (Uri sliceUri)

Set the Uri of the Slice that represents this Indexable. Permissions needed to bind to the Slice will be automatically granted to apps that have access to this Indexable based on its Scope.

Parameters
sliceUri It must be a valid Uri.

public Indexable.Metadata.Builder setWorksOffline (boolean worksOffline)

Sets whether the object is available offline in the app.

Working offline means that a user is able to launch the app with the URL and interact with the content without network connections, e.g. in airplane mode.

Parameters
worksOffline Represents whether the object works offline. The default is false.