Androidmanifest. xml file (path-permission)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.