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 ...
随机推荐
- android 修改系统的dialog样式
android 修改系统的dialog样式 一.觉得自定义配置文件麻烦?那就来修改系统自定义XML文件来实现修改系统dialog的样式吧. 如果是在XML中样式:首先来说下样式. 在 Style.x ...
- linux下调整音量大小
不得不说,在linux下整音频和视频真是不容易.在windows中自带了关于音频和视频的工具,在linux下要两眼一抹黑地使用命令进行操作. 主要还是在linux下没找到合适的gui的调整工具. 几番 ...
- jquery ui和jquery easy ui的区别
jquery ui 是jquery开发团队 开发,适用于网站式的页面.jquery easyui 是第三方基于jquery开发,适用于应用程序式的页面. 两者的方法调用也略有不同:jquery ui ...
- VS中快速生成json数据格式对应的实体
JSON是一种取代XML的数据结构,和xml相比,它更小巧但描述能力却不差,由于它的小巧所以网络传输数据将减少更多流量从而加快速度. JSON就是一串字符串 只不过元素会使用特定的符号标注. {} 双 ...
- Ubuntu 13.10 64位 无法 安装 ia32-libs 解决办法
安装新立德软件包管理器:打开终端,输入以下命令:sudo apt-get install synaptic 打开新立德软件包管理器,选择“设置>软件库” 选择“其他软件 > 添加” 在AP ...
- java concurrency in practice读书笔记---ThreadLocal原理
ThreadLocal这个类很强大,用处十分广泛,可以解决多线程之间共享变量问题,那么ThreadLocal的原理是什么样呢?源代码最能说明问题! public class ThreadLocal&l ...
- 鸟哥的linux私房菜学习记录之档案与目录管理
绝对路径和相对路径 绝对路径就是从根目录到某个目录下的路径,从根目录写起,也就是/ 相对路径就是从用户当前目录的路径写起 目录相关操作 cd 切换路径 例如:cd /var/www 切换到/var/w ...
- uboot启动参数
bootcmd=nand read.jffs2 0x30007FC0 kernel; bootm 0x30007FC0bootdelay=2baudrate=115200ethaddr=08:00:3 ...
- laravel队列
三种情况: queue:work 默认只执行一次队列请求, 当请求执行完成后就终止; queue:listen 监听队列请求, 只要运行着, 就能一直接受请求, 除非手动终止; queue:work ...
- SendKeys:基本使用
使用SendKeys将键击和组合键击发送到活动应用程序.此类无法实例化.若要发送一个键击给某个类并立即继续程序流,请使用Send.若要等待键击启动的任何进程,请使用SendWait. 每个键都由一个或 ...