Struct android_manifest::QueriesProvider [−][src]
pub struct QueriesProvider {
pub authorities: AttributeList<Semicolon, String>,
}Expand description
Declares a content provider component used in <queries>.
A content provider is a subclass of ContentProvider that supplies structured
access to data managed by the application. All content providers in your application
must be defined in a <provider> element in the manifest file; otherwise, the system
is unaware of them and doesn’t run them.
You only declare content providers that are part of your application. Content providers in other applications that you use in your application should not be declared.
The Android system stores references to content providers according to an authority
string, part of the provider’s content URI. For example, suppose you want to access a
content provider that stores information about health care professionals.
To do this, you call the method ContentResolver.query(),
which among other arguments takes a URI that identifies the provider:
XML Example
content://com.example.project.healthcareprovider/nurses/rn
The content: scheme identifies the URI as a content URI pointing to an Android
content provider. The authority com.example.project.healthcareprovider identifies
the provider itself; the Android system looks up the authority in its list of known
providers and their authorities. The substring nurses/rn is a path, which the
content provider can use to identify subsets of the provider data.
In cases where you need to query a content provider but don’t know the specific
package names, you can declare that provider authority in a
XML Example
<manifest package="com.example.suite.enterprise">
<queries>
<provider android:authorities="com.example.settings.files" />
</queries>
...
</manifest>
Node
If your Preparing your Gradle build for package visibility in Android 11.
Contained in
Introduced in
API Level 30
Fields
A list of one or more URI authorities that identify data offered by the content
provider. Multiple authorities are listed by separating their names with a
semicolon. To avoid conflicts, authority names should use a Java-style naming
convention (such as com.example.provider.cartoonprovider). Typically, it’s the
name of the ContentProvider subclass that implements the provider
There is no default. At least one authority must be specified.
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, [src]Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
fn serialize_attributes(
&self,
source_attributes: Vec<OwnedAttribute>,
source_namespace: Namespace
) -> Result<(Vec<OwnedAttribute>, Namespace), String>[src]Auto Trait Implementations
impl RefUnwindSafe for QueriesProviderimpl Send for QueriesProviderimpl Sync for QueriesProviderimpl Unpin for QueriesProviderimpl UnwindSafe for QueriesProviderBlanket Implementations
Mutably borrows from an owned value. Read more