Description

Declares the base name for a tree of permissions. The application takes ownership of all names within the tree. It can dynamically add new permissions to the tree by callingPackageManager.addPermission() . Names within the tree are separated by periods ('. '). For example, if the base name is com.example.project.taxes, permissions like the following might be added:

com.example.project.taxes.CALCULATE com.example.project.taxes.deductions.MAKE SOME UP com.example.project.taxes.deductions.EXAGGERATE

Note that this element does not declare a permission itself, only a namespace in which further permissions can be placed. See the <permission> element for information on declaring permissions.

attributes:

android:name

The name that's at the base of the permission tree. It serves as a prefix to all permission names in the tree. Java-style scoping should be used to ensure that the name is unique. The name must have more than two period-separated seqments in its path — for example, com. example.base is OK, but com.example is not.

INTRODUCED IN: API Level 1 SEE ALSO: <permission> <permission-group> <uses-permission>

<provider>

syntax:

<provider android

authorities="list"

android

enabled=["true" | "false"]

android

exported=["true" | "false"]

android

grantUriPermissions=["true" | "false"]

android

icon="drawable resource"

android

initOrder="integer"

android

label="string resource"

android

multiprocess=["true" | "false"]

android

name="string"

android

permission="string"

android

process="string"

android:icon

An icon representing all the permissions in the tree. This attribute must be set as a reference to a drawable resource containing the image definition.

android:label

A user-readable name for the group. As a convenience, the label can be directly set as a raw string for quick and dirty programming. However, when the application is ready to be published, it should be set as a reference to a string resource, so that it can be localized like other strings in the user interface.

android

readPermission="string"

android

syncable=["true" | "false"]

android

writePermission="string" >

</provider>

<application>

CAN CONTAIN:

<meta-data>

<grant-uri-permission> <path-permission />

DESCRIPTION:

Declares a content provider — a subclass of ContentProvider — that supplies structured access to data managed by the application. All content providers that are part of the application must be represented by <provider> elements in the manifest file. The system cannot see, and therefore will not run, any that are not declared. (You need to declare only those content providers that you develop as part of your application, not those developed by others that your application uses.)

The Android system identifies content providers by the authority part of a content: URI. For example, suppose that the following URI is passed to ContentResolver.query() :

content://com.example.project.healthcareprovider/nurses/rn The content: scheme identifies the data as belonging to a content provider and the authority

(com.example.project.healthcareprovider) identifies the particular provider. The authority therefore must be unique. Typically, as in this example, it's the fully qualified name of a ContentProvider subclass. The path part of a URI may be used by a content provider to identify particular data subsets, but those paths are not declared in the manifest.

For information on using and developing content providers, see a separate document, Content Providers.

0 0

Post a comment