Language

SchemaVisibilityConfig.Builder.SetPubliclyVisibleTargetPackage Method

Definition

Specify that this schema should be publicly available, to the same packages that have visibility to the package passed as a parameter.

[Android.Runtime.Register("setPubliclyVisibleTargetPackage", "(Landroid/app/appsearch/PackageIdentifier;)Landroid/app/appsearch/SchemaVisibilityConfig$Builder;", "", ApiSince=35)]
public Android.App.AppSearch.SchemaVisibilityConfig.Builder SetPubliclyVisibleTargetPackage(Android.App.AppSearch.PackageIdentifier? packageIdentifier);
[<Android.Runtime.Register("setPubliclyVisibleTargetPackage", "(Landroid/app/appsearch/PackageIdentifier;)Landroid/app/appsearch/SchemaVisibilityConfig$Builder;", "", ApiSince=35)>]
member this.SetPubliclyVisibleTargetPackage : Android.App.AppSearch.PackageIdentifier -> Android.App.AppSearch.SchemaVisibilityConfig.Builder

Parameters

packageIdentifier
PackageIdentifier

the PackageIdentifier of the package that will be used as the target package in a call to PackageManager.canPackageQuery(String, String) to determine which packages can access this publicly visible schema. This value may be null.

Returns

Attributes

Remarks

Specify that this schema should be publicly available, to the same packages that have visibility to the package passed as a parameter. This visibility is determined by the result of PackageManager.canPackageQuery(String, String). It is possible for the packageIdentifier parameter to be different from the package performing the indexing. This might happen in the case of an on-device indexer processing information about various packages. The visibility will be the same regardless of which package indexes the document, as the visibility is based on the packageIdentifier parameter. Calling this with packageIdentifier set to null is valid, and will remove public visibility for the schema.

Android reference for android.app.appsearch.SchemaVisibilityConfig.Builder.setPubliclyVisibleTargetPackage.

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