SetSchemaRequest.Builder.SetPubliclyVisibleSchema Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specify that the schema should be publicly available, to packages which already have visibility to packageIdentifier.
[Android.Runtime.Register("setPubliclyVisibleSchema", "(Ljava/lang/String;Landroid/app/appsearch/PackageIdentifier;)Landroid/app/appsearch/SetSchemaRequest$Builder;", "", ApiSince=35)]
public Android.App.AppSearch.SetSchemaRequest.Builder SetPubliclyVisibleSchema(string schema, Android.App.AppSearch.PackageIdentifier? packageIdentifier);
[<Android.Runtime.Register("setPubliclyVisibleSchema", "(Ljava/lang/String;Landroid/app/appsearch/PackageIdentifier;)Landroid/app/appsearch/SetSchemaRequest$Builder;", "", ApiSince=35)>]
member this.SetPubliclyVisibleSchema : string * Android.App.AppSearch.PackageIdentifier -> Android.App.AppSearch.SetSchemaRequest.Builder
Parameters
- schema
- String
the schema to make publicly accessible. This value cannot be null.
- packageIdentifier
- PackageIdentifier
if an app can see this package via PackageManager#canPackageQuery, it will be able to see the documents of type schema. This value may be null.
Returns
- Attributes
Remarks
Specify that the schema should be publicly available, to packages which already have visibility to packageIdentifier. 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. If this is called repeatedly with the same schema, the PackageIdentifier in the last call will be used as the "from" package for that schema. Calling this with packageIdentifier set to null is valid, and will remove public visibility for the schema.
Android reference for android.app.appsearch.SetSchemaRequest.Builder.setPubliclyVisibleSchema.
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.