GetSchemaResponse.Builder.SetSchemaTypeVisibleToPackages Method

Definition

Sets whether or not documents from the provided schemaType can be read by the specified package.

[Android.Runtime.Register("setSchemaTypeVisibleToPackages", "(Ljava/lang/String;Ljava/util/Set;)Landroid/app/appsearch/GetSchemaResponse$Builder;", "", ApiSince=33)]
public Android.App.AppSearch.GetSchemaResponse.Builder SetSchemaTypeVisibleToPackages(string schemaType, System.Collections.Generic.ICollection<Android.App.AppSearch.PackageIdentifier> packageIdentifiers);
[<Android.Runtime.Register("setSchemaTypeVisibleToPackages", "(Ljava/lang/String;Ljava/util/Set;)Landroid/app/appsearch/GetSchemaResponse$Builder;", "", ApiSince=33)>]
member this.SetSchemaTypeVisibleToPackages : string * System.Collections.Generic.ICollection<Android.App.AppSearch.PackageIdentifier> -> Android.App.AppSearch.GetSchemaResponse.Builder

Parameters

schemaType
String

The schema type to set visibility on. This value cannot be null.

packageIdentifiers
ICollection<PackageIdentifier>

Represents the package that has access to the given schema type. This value cannot be null.

Returns

Attributes

Remarks

Sets whether or not documents from the provided schemaType can be read by the specified package. Each package is represented by a PackageIdentifier, containing a package name and a byte array of type PackageManager.CERT_INPUT_SHA256. To opt into one-way data sharing with another application, the developer will need to explicitly grant the other application’s package name and certificate Read access to its data. For two-way data sharing, both applications need to explicitly grant Read access to one another.

Android reference for android.app.appsearch.GetSchemaResponse.Builder.setSchemaTypeVisibleToPackages.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to