<grant-uri-permission android:path="string" android:pathPattern="string" android:pathPrefix="string" />
content:URI. (The authority part of the URI identifies the content provider.) Granting permission is a way of enabling clients of the provider that don't normally have permission to access its data to overcome that restriction on a one-time basis.
If a content provider's
attribute is "
true", permission can be granted for any the data under
the provider's purview. However, if that attribute is "
can be granted only to data subsets that are specified by this element.
A provider can contain any number of
Each one can specify only one path (only one of the three possible attributes).
pathattribute specifies a complete path; permission can be granted only to the particular data subset identified by that path. The
pathPrefixattribute specifies the initial part of a path; permission can be granted to all data subsets with paths that share that initial part. The
pathPatternattribute specifies a complete path, but one that can contain the following wildcards:
*') matches a sequence of 0 to many occurrences of the immediately preceding character.
A period followed by an asterisk ("
.*") matches any sequence of
0 to many characters.
\' is used as an escape character when the string is read
from XML (before it is parsed as a pattern), you will need to double-escape:
For example, a literal '
*' would be written as "
\\*" and a
\' would be written as "
\\\\". This is basically
the same as what you would need to write if constructing the string in Java code.
grantUriPermissionsattribute of the