Indexable.Metadata.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
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 . |
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. |
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 . |
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 . |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-02-11 UTC.
[null,null,["Last updated 2021-02-11 UTC."],[],[],null,["# Indexable.Metadata.Builder\n\npublic static final class **Indexable.Metadata.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nThe builder for [Indexable.Metadata](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata). \n\n### Public Constructor Summary\n\n|---|----------------------------------------------------------------------------------------------------------------------------|\n| | [Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder#Builder())() The constructor. |\n\n### Public Method Summary\n\n|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Indexable.Metadata.Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder) | [setScope](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder#setScope(int))(int scope) Set the scope of the Indexable. |\n| [Indexable.Metadata.Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder) | [setScore](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder#setScore(int))(int score) Sets the score of the object. |\n| [Indexable.Metadata.Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder) | [setSliceUri](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder#setSliceUri(android.net.Uri))([Uri](//developer.android.com/reference/android/net/Uri.html) sliceUri) Set the Uri of the Slice that represents this [Indexable](/docs/reference/android/com/google/firebase/appindexing/Indexable). |\n| [Indexable.Metadata.Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder) | [setWorksOffline](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder#setWorksOffline(boolean))(boolean worksOffline) Sets whether the object is available offline in the app. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public **Builder** ()\n\nThe constructor.\n\nPublic Methods\n--------------\n\n#### public [Indexable.Metadata.Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder)\n**setScope** (int scope)\n\nSet the scope of the Indexable. When it is not set explicitly, the default is\n[Scope.ON_DEVICE](/docs/reference/android/com/google/firebase/appindexing/Scope#ON_DEVICE). \n\n##### Parameters\n\n| scope | It must be one of the values in [Scope](/docs/reference/android/com/google/firebase/appindexing/Scope). |\n|-------|---------------------------------------------------------------------------------------------------------|\n\n#### public [Indexable.Metadata.Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder)\n**setScore** (int score)\n\nSets the score of the object.\n\nThe score signifies the relative importance of this compared to other objects in the\nindex from the app. \n\n##### Parameters\n\n| score | The score. The default is zero (0), negative values are not allowed. |\n|-------|----------------------------------------------------------------------|\n\n#### public [Indexable.Metadata.Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder)\n**setSliceUri** ([Uri](//developer.android.com/reference/android/net/Uri.html) sliceUri)\n\nSet the Uri of the Slice that represents this [Indexable](/docs/reference/android/com/google/firebase/appindexing/Indexable).\nPermissions needed to bind to the Slice will be automatically granted to apps that have\naccess to this [Indexable](/docs/reference/android/com/google/firebase/appindexing/Indexable)\nbased on its [Scope](/docs/reference/android/com/google/firebase/appindexing/Scope). \n\n##### Parameters\n\n| sliceUri | It must be a valid [Uri](//developer.android.com/reference/android/net/Uri.html). |\n|----------|-----------------------------------------------------------------------------------|\n\n#### public [Indexable.Metadata.Builder](/docs/reference/android/com/google/firebase/appindexing/Indexable.Metadata.Builder)\n**setWorksOffline** (boolean worksOffline)\n\nSets whether the object is available offline in the app.\n\nWorking offline means that a user is able to launch the app with the URL and\ninteract with the content without network connections, e.g. in airplane mode. \n\n##### Parameters\n\n| worksOffline | Represents whether the object works offline. The default is `false`. |\n|--------------|----------------------------------------------------------------------|"]]