# SetBlobVisibilityRequest.Builder

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[T Extensions 17](https://developer.android.com/sdkExtensions)  
Summary:[Ctors](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder#pubctors)\|[Methods](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder#inhmethods)  

# SetBlobVisibilityRequest.Builder

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/app/appsearch/SetBlobVisibilityRequest.Builder "View this page in Kotlin")\|Java

`
public
static
final

class
SetBlobVisibilityRequest.Builder
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|--------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.appsearch.SetBlobVisibilityRequest.Builder |

<br />

*** ** * ** ***

Builder for[SetBlobVisibilityRequest](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest)objects.

## Summary

|                                                    ### Public constructors                                                     ||
|-----------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Builder](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder#Builder())`() ` |

|                                                                                                                                                                                                                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                         ||
|---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[SetBlobVisibilityRequest.Builder](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder) | ` `[addNamespaceVisibleToConfig](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder#addNamespaceVisibleToConfig(java.lang.String,%20android.app.appsearch.SchemaVisibilityConfig))`(`[String](https://developer.android.com/reference/java/lang/String)` namespace, `[SchemaVisibilityConfig](https://developer.android.com/reference/android/app/appsearch/SchemaVisibilityConfig)` visibilityConfig) ` Specifies that blobs within the given`namespace`can be accessed by the caller if they meet the requirements defined in[SchemaVisibilityConfig](https://developer.android.com/reference/android/app/appsearch/SchemaVisibilityConfig). |
| ` `[SetBlobVisibilityRequest](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest)                 | ` `[build](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder#build())`() ` Builds a new[SetBlobVisibilityRequest](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest)object.                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ` `[SetBlobVisibilityRequest.Builder](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder) | ` `[clearNamespaceVisibleToConfigs](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder#clearNamespaceVisibleToConfigs(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` namespace) ` Clears all visibility configurations for the specified blob`namespace`.                                                                                                                                                                                                                                                                                                                                            |
| ` `[SetBlobVisibilityRequest.Builder](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder) | ` `[setNamespaceDisplayedBySystem](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder#setNamespaceDisplayedBySystem(java.lang.String,%20boolean))`(`[String](https://developer.android.com/reference/java/lang/String)` namespace, boolean displayed) ` Sets whether or not blobs in the specified`namespace`will be displayed on any system UI surface.                                                                                                                                                                                                                                                                                       |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### Builder

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[T Extensions 17](https://developer.android.com/sdkExtensions)  

```
public Builder ()
```

<br />

<br />

## Public methods

### addNamespaceVisibleToConfig

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[T Extensions 17](https://developer.android.com/sdkExtensions)  

```
public SetBlobVisibilityRequest.Builder addNamespaceVisibleToConfig (String namespace, 
                SchemaVisibilityConfig visibilityConfig)
```

Specifies that blobs within the given`namespace`can be accessed by the caller if they meet the requirements defined in[SchemaVisibilityConfig](https://developer.android.com/reference/android/app/appsearch/SchemaVisibilityConfig).

The requirements in each[SchemaVisibilityConfig](https://developer.android.com/reference/android/app/appsearch/SchemaVisibilityConfig)have an "AND" relationship, meaning that all conditions within a configuration must be met for access. For instance, the caller may need specific permissions and belong to a specific package.

Repeated calls to this method can add multiple[SchemaVisibilityConfig](https://developer.android.com/reference/android/app/appsearch/SchemaVisibilityConfig)s to a namespace. The caller will have access if they match any of the configurations added, so the configurations form an "OR" relationship.

<br />

|                                                            Parameters                                                            ||
|--------------------|--------------------------------------------------------------------------------------------------------------|
| `namespace`        | `String`: The blob namespace to set visibility for. This value cannot be`null`. <br />                       |
| `visibilityConfig` | `SchemaVisibilityConfig`: The config hold specifying visibility settings. This value cannot be`null`. <br /> |

|                                                                                Returns                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [SetBlobVisibilityRequest.Builder](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder) | This value cannot be`null`. <br /> |

### build

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[T Extensions 17](https://developer.android.com/sdkExtensions)  

```
public SetBlobVisibilityRequest build ()
```

Builds a new[SetBlobVisibilityRequest](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest)object.

<br />

|                                                                        Returns                                                                         ||
|--------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [SetBlobVisibilityRequest](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest) | This value cannot be`null`. <br /> |

### clearNamespaceVisibleToConfigs

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[T Extensions 17](https://developer.android.com/sdkExtensions)  

```
public SetBlobVisibilityRequest.Builder clearNamespaceVisibleToConfigs (String namespace)
```

Clears all visibility configurations for the specified blob`namespace`.

After calling this method, the specified namespace will have no visibility configurations, meaning it will only be accessible by default rules.

<br />

|                                                         Parameters                                                          ||
|-------------|----------------------------------------------------------------------------------------------------------------|
| `namespace` | `String`: The blob namespace for which visibility config should be cleared. This value cannot be`null`. <br /> |

|                                                                                Returns                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [SetBlobVisibilityRequest.Builder](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder) | This value cannot be`null`. <br /> |

### setNamespaceDisplayedBySystem

Added in[API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Also in[T Extensions 17](https://developer.android.com/sdkExtensions)  

```
public SetBlobVisibilityRequest.Builder setNamespaceDisplayedBySystem (String namespace, 
                boolean displayed)
```

Sets whether or not blobs in the specified`namespace`will be displayed on any system UI surface.

This setting applies to the provided`namespace`only, all other`namespace`s that are not included here will be reverted to the default displayed setting.

If this method is not called, the default behavior allows blobs to be displayed on system UI surfaces.

<br />

|                                                    Parameters                                                    ||
|-------------|-----------------------------------------------------------------------------------------------------|
| `namespace` | `String`: The name of the namespace to configure visibility for. This value cannot be`null`. <br /> |
| `displayed` | `boolean`: If`false`, blobs in this namespace will not appear on system UI surfaces. <br />         |

|                                                                                Returns                                                                                 ||
|------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| [SetBlobVisibilityRequest.Builder](https://developer.android.com/reference/android/app/appsearch/SetBlobVisibilityRequest.Builder) | This value cannot be`null`. <br /> |