Language

SchemaVisibilityConfig.Builder.SetPubliclyVisibleTargetPackage Method

Definition

Sets the target package for the public-visibility condition.

[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 used as the target package in a call to PackageManager.canPackageQuery(String, String) to determine whether a caller satisfies the public-visibility condition. This value may be null.

Returns

This builder instance.

Attributes

Remarks

Sets the target package for the public-visibility condition, which is checked with PackageManager.canPackageQuery(String, String). The target can differ from the package performing the indexing, for example when an on-device indexer processes information about other packages. The check uses the target package regardless of which package indexed the document. Other visibility requirements may also apply. Passing null removes this public-visibility condition from the configuration.

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