<grant-uri-permission>
English Original: http://developer.android.com/guide/topics/manifest/grant-uri-permission-element.html
Acquisition (update) Date: 2014-6-30
Moved from the original blog: http://blog.sina.com.cn/s/blog_48d491300100zmug.html
-
-
Grammar:
-
-
<android:path= "string" android:pathpattern= "string" android:pathprefix= "string"/>
-
-
Included in:
-
-
<provider>
-
-
Description
-
-
specifies which subsets of the parent Content Provider access permissions can be authorized. These subsets
content: are marked with the path portion. (The authority part of the URI identifies the Content Provider.) This authorization mechanism provides a one-time access to content Provider clients, which are clients that normally do not have access to the data in the content Provider.
If the property value of Content Provider grantUriPermissions is " true ", all data within that Provider can be granted access. If it is set to " false ", only a subset of the data specified by this element can be authorized. A Provider can contain any number of <grant-uri-permission> elements. Each of these can only specify one path (one of three possible attributes).
For more information about how to authorize, see <intent-filter> attributes of an element grantUriPermissions .
-
-
Property:
-
-
-
android:path
android:pathPrefix
android:pathPattern
-
Identifies the path portion of one or more subsets of data that can be authorized.
pathproperty specifies the full path, and only a subset of the data that is part of the specified path is authorized. pathPrefixproperty to specify the starting part of the path, and only those data that is prefixed with this path are authorized. pathPatternproperty also specifies the full path, except that it can contain the following wildcard characters:
- The asterisk ('
* ) matches 0 or more occurrences of the preceding character immediately.
- A period plus an asterisk ("
.* ") matches any character 0 or more times.
When reading a string from XML (before parsing as an expression), ' \ is used as an escape character and therefore requires two escapes: for example, ' * should be written ', ' \\* \ should be written ' \\\\ . This is basically the same as the syntax for constructing strings in Java code.
For more information about these three expressions, see the PatternMatcher PATTERN_LITERAL , and descriptions in the class PATTERN_PREFIX PATTERN_SIMPLE_GLOB .
-
-
Introduced from:
-
-
API Level 1
-
-
See:
-
-
<provider> The attributes of the element grantUriPermissions .
Android Development-api Guide-<grant-uri-permission>