Info

syntax:

<grant-uri-permission android:path="string"

android:pathPattern="string" android:pathPrefix="string" />

CONTAINED IN: <provider>

description:

Specifies which data subsets of the parent content provider permission can be granted for. Data subsets are indicated by the path part of a 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 grantUriPermissions attribute is "true", permission can be granted for any the data under the provider's purview. However, if that attribute is "false", permission can be granted only to data subsets that are specified by this element. A provider can contain any number of <grant-uri-permission> elements. Each one can specify only one path (only one of the three possible attributes).

For information on how permission is granted, see the <intent-filter> element's grantUriPermissions attribute.

attributes:

android:path android:pathPrefix android:pathPattern

A path identifying the data subset or subsets that permission can be granted for. The path attribute specifies a complete path; permission can be granted only to the particular data subset identified by that path. The pathPrefix attribute specifies the initial part of a path; permission can be granted to all data subsets with paths that share that initial part. The pathPattern attribute specifies a complete path, but one that can contain the following wildcards:

• An asterisk ('*') 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.

Because '\' 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 literal would be written as "\\\\". This is basically the same as what you would need to write if constructing the string in Java code.

For more information on these types of patterns, see the descriptions of PATTERN LITERAL, PATTERN PREFIX, and PATTERN SIMPLE GLOB in the PatternMatcher class.

INTRODUCED IN: API Level 1

see also:

the granturiPermissions attribute of the <provider> element

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License. J-&

Site Terms of Service - Privacy Policy - Brand Guidelines

<instrumentation>

syntax:

<instrumentation android:functionalTest=r"true" | "false"] android:handleProfiling=r"true" | "false"] android:icon="drawable resource" android:label="string resource" android:name="string" android:targetPackage="string" />

contained in: <manifest>

description:

Declares an Instrumentation class that enables you to monitor an application's interaction with the system. The Instrumentation object is instantiated before any of the application's components.

attributes:

android:functionalTest

Whether or not the Instrumentation class should run as a functional test — "true" if it should, and "false" if not. The default value is "false".

android:handleProfiling

Whether or not the Instrumentation object will turn profiling on and off — "true" if it determines when profiling starts and stops, and "false" if profiling continues the entire time it is running. A value of "true" enables the object to target profiling at a specific set of operations. The default value is "false".

android:icon

An icon that represents the Instrumentation class. This attribute must be set as a reference to a drawable resource.

android:label

A user-readable label for the Instrumentation class. The label can be set as a raw string or a reference to a string resource.

android:name

The name of the Instrumentation subclass. This should be a fully qualified class name (such as, "com.example.project.Stringlnstrumentation"). However, as a shorthand, if the first character of the name is a period, it is appended to the package name specified in the <manifest> element.

There is no default. The name must be specified.

introduced in: API Level 1

android:targetPackage

The application that the Instrumentation object will run against. An application is identified by the package name assigned in its manifest file by the <manifest> element.

Except as noted, this content is licensed under Apache 2.0. For details and restrictions, see the Content License. ! Go to top

Site Terms of Service - Privacy Policy - Brand Guidelines

0 -1

Post a comment