ContentProvider官方教程(10)<provider>元素及属性介绍
The <provider> Element
Like Activity and Service components, a subclass of ContentProvider must be defined in the manifest file for its application, using the <provider> element. The Android system gets the following information from the element:
- Authority (android:authorities)
Symbolic names that identify the entire provider within the system. This attribute is described in more detail in the section Designing Content URIs.
- Provider class name ( android:name ) 注意:是class name
The class that implements ContentProvider. This class is described in more detail in the section Implementing the ContentProvider Class.
- Permissions 权限
Attributes that specify the permissions that other applications must have in order to access the provider's data:
- android:grantUriPermssions: Temporary permission flag.
- android:permission: Single provider-wide read/write permission.
- android:readPermission: Provider-wide read permission.
- android:writePermission: Provider-wide write permission.
Permissions and their corresponding attributes are described in more detail in the section Implementing Content Provider Permissions.
- Startup and control attributes 启动属性
These attributes determine how and when the Android system starts the provider, the process characteristics of the provider, and other run-time settings:
- android:enabled: Flag allowing the system to start the provider.
- 是否随系统启动
- android:exported: Flag allowing other applications to use this provider.
- android:initOrder: The order in which this provider should be started, relative to other providers in the same process.
- 是否初始化
- android:multiProcess: Flag allowing the system to start the provider in the same process as the calling client.
- 与客户端同进程
- android:process: The name of the process in which the provider should run.
- android:syncable: Flag indicating that the provider's data is to be sync'ed with data on a server.
- android:enabled: Flag allowing the system to start the provider.
The attributes are fully documented in the dev guide topic for the <provider> element.
- 详见 guide/topics/manifest/provider-element.html
- Informational attributes
An optional icon and label for the provider:
- android:icon: A drawable resource containing an icon for the provider. The icon appears next to the provider's label in the list of apps in Settings > Apps > All.
- android:label: An informational label describing the provider or its data, or both. The label appears in the list of apps in Settings > Apps > All.
The attributes are fully documented in the dev guide topic for the <provider> element.
- 详见 guide/topics/manifest/provider-element.html
ContentProvider官方教程(10)<provider>元素及属性介绍的更多相关文章
- ContentProvider官方教程(6)provider支持的数据类型
Provider Data Types Content providers can offer many different data types. The User Dictionary Provi ...
- ContentProvider官方教程(9)定义一个provider完整示例:实现方法,定义权限等
Creating a Content Provider In this document Designing Data Storage Designing Content URIs Implement ...
- ContentProvider官方教程(1)何时用content provider
Content Providers Content providers manage access to a structured set of data. They encapsulate the ...
- ContentProvider官方教程(11)Calendar Provider、Contacts Provider、Storage Access Framework
Calendar Provider: guide/topics/providers/calendar-provider.html Contacts Provider: guide/topics/pro ...
- ContentProvider官方教程(7)3种访问形式:批处理、异步访问、intent间接访问(临时URI权限)
Alternative Forms of Provider Access Three alternative forms of provider access are important in app ...
- ContentProvider官方教程(5)ContentResolver插入、更新、删除 示例
Inserting, Updating, and Deleting Data In the same way that you retrieve data from a provider, you a ...
- ContentProvider官方教程(2)简介、Content URIs
In this document Overview Accessing a provider Content URIs Content Provider Basics A content provid ...
- ContentProvider官方教程(8)自定义MIME
MIME Type Reference Content providers can return standard MIME media types, or custom MIME type stri ...
- ContentProvider官方教程(4)ContentResolver权限
Content Provider Permissions A provider's application can specify permissions that other application ...
随机推荐
- SPOJ COT3 Combat on a tree(Trie树、线段树的合并)
题目链接:http://www.spoj.com/problems/COT3/ Alice and Bob are playing a game on a tree of n nodes.Each n ...
- 1019: A+B和C比大小
1019: A+B和C比大小 时间限制: 1 Sec 内存限制: 128 MB提交: 518 解决: 300[提交][状态][讨论版] 题目描述 给定区间[-231, 231]内的3个整数A.B和 ...
- JSon_零基础_001_将布尔类型数组转换为JSon格式字符串,返回给界面
将布尔类型数组转换为JSon格式字符串,返回给界面 需要导入包: 编写bean: package com.west.webcourse.po; /** * 第01步:编写bean类, * 下一步com ...
- mysql报错 "code":"08S01","msg":"SQLSTATE
2016-04-25 09:22 97人阅读 评论(0) 收藏 举报 分类: Magento(6) 今天在批量伪造测试数据时,MySQL收到下面异常:ERROR 1153 (08S01): Got a ...
- JSP-04- 实现数据的保存
.1 Session 一段时间内,单个客户与Web服务器的一连串相关的交换过程. Ø 4.1.1 应用的场景: 用户登录后保存用户状态 确定用户的唯一 Sessin.getId(); Ø ...
- php 获取mac地址
<?php /** * 获取机器网卡的物理(MAC)地址* 目前支持WIN/LINUX系统 * 编辑: www.jbxue.com**/ class MacAddInfo { ...
- opencv之深拷贝及浅拷贝,IplImage装换为Mat
一.(1) 浅拷贝: Mat B; B = image // 第一种方式 Mat C(image); // 第二种方式 这两种方式称为浅copy,是由于它们有不同的矩阵头,但是它们共享内存空间,即 ...
- 【GDI+】继续图形的问题
现在有一个需求: 一个或多个四个点组成的矩形,一个或多个值指定 下一点->当前点方向的垂直方向是不闭合的. 目前大概有三种情况: 1.只有一个矩形且只有一个指定不闭合方向的时候,此时只用按照指定 ...
- 两个升序链表的合并 Merge Two Sorted Lists 【 leetcode】
class Solution {public: ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { ListNode *p; ListN ...
- javascript,jquery代码规范
jquery代码规范 Coding Standards & Best Practices 中文翻译版:jquery编程的标准写法和最佳实践 javascript代码规范 JavaScript编 ...