Syntax (syntax ):
<Path-permissionandroid: Path = "string"
Android: pathprefix = "string"
Android: pathpattern = "string"
Android: Permission = "string"
Android: readpermission = "string"
Android: writepermission = "string"/>
Included in (contained in ):
<Provider>
Description ):
This element is used to define the path of a specific data subset in the content provider and the necessary permissions. This element can be used multiple times to provide multiple paths.
Attributes (attributes ):
Android: Path
Define a complete uri (data resource identification) path for the data of the content provider. Permissions can only be granted to specific data identified by this path.
Android: pathprefix
This attribute defines the initial part of the URI of the Data subset of the content provider. Permissions can be granted to all data subsets that share the initial part of this URI.
Android: pathpattern
This attribute defines a complete URI path for the data subset of the content provider, but the URI can use one of the following wildcards:
1. asterisk (*) is a wildcard. * Asterisk in the path represents the character before any number of asterisks, such as a *, which can be a, AA, AAA, AAAA ,... string matching.
2. A combination of dots and asterisks (. *) wildcard, which can be matched with any string, such as. * HTML, which can be followed by abchhtml?chtml=html#dssf.html ,... .
Because the system uses the '\' symbol as a mandatory escape character when reading a string in XML, it needs to be escaped twice. For example, the "*" symbol must be written as "\ *", and the '\' symbol must be written "\\\\". This is basically the same as writing in Java code.
For more information about these pattern types, see the descriptions of pattern_literal, pattern_prefix, and pattern_simple_glob in the patternmatcher class.
Http://developer.android.com/reference/android/ OS /PatternMatcher.html
Android: Permission
This attribute defines a permission name. The client must have this permission to read and write the number of data in the content provider. This attribute is convenient for setting read/write permissions for data, but the readpermission and writepermission attributes have higher priority than this attribute.
Android: readpermission
The client must have this permission to read the data in the query content provider.
Android: writepermission
To change the data controlled by the content provider, the client must have this permission.
Introduced version (introduced in ):
API level 4