Like the activity and service components, the contentprovider subclass must be defined using the <provider> element in its Application List file. The Android system obtains the following information from this element:
1. Authorization (Android: Authorities)
The identifier of the entire provider in the system.
2. Provides the class name (Android: name)
This class implements the contentprovider abstract class.
3. Permission
Attribute that specifies the permissions required for other applications to access the data of the provider:
A. Android. granturipermssions: Temporary Permission ID;
B. Android. Permission: Read and Write Permissions within a single provider range;
C. Android. readpermission: Provides the read permission for the range of devices;
D. Android. writepermission: Provides write permission for the range of devices.
Permissions and their corresponding attributes are described in detail in the "implement content providers' Permissions" section.
Enable and control attributes
The following attributes determine how the Android system starts the provisioner, the processing features of the provisioner, and other runtime settings:
1. Android: enabled: Indicates whether to allow the system to start the provider;
2. Android: exported: whether other applications are allowed to use the identifier of this provider;
3. Android: initorder: The Starting sequence of the provider relative to that of other providers in the same process.
4. Android: Multiprocess: whether to allow the provider to start in the same process as the client that calls it;
5. Android: Process: name of the process that the provider should run;
6. Android: syncable: indicates whether the provider's data must be synchronized with the server's data.
These attributes are described in the topic of the <provider> element Development Guide.
Information attributes
An optional icon and tag for the provisioner:
1. Android: icon: contains the resource icons that can be traced by the provider. This icon is displayed next to the provisioner tag in the Application List of setting> apps> All.
2. Android: Label: An information label that describes the provider or its data. This label is displayed in the Application List of setting> apps> All.
These attributes are described in the topic of the <provider> element Development Guide.