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 ...
随机推荐
- php 随机生成
php随机生成6位字符串: $str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz'; $max = ...
- hdu5390 tree
先求出dfs序,然后建立线段树,线段树每个节点套一个set. 修改操作只需要改被子树区间完全覆盖的线段树节点,将其节点中set的原来的值删除,加入新值. 询问操作查询单点到根的所有节点上的set中与查 ...
- xsd与xsl文件的区别
请问xsd与xsl文件的区别在哪里呢? 我刚学xml,一开始用xmlspy学的,然后生成了一个xsd的文件,但在网上下的源程序是有一个xsl文件的,很不明之间有什么区别的,为什么别人的程序不用xs ...
- JAVA测试装饰者模式
package shb.java.demo; /** * 测试装饰者模式 * @package :shb.java.demoJava02 * @author shaobn * @Describe : ...
- Linux下用SCP无需输入密码传输文件
在Linux环境下,两台主机之间传输文件一般使用scp命令,通常用scp命令通过ssh获取对方linux主机文件的时候都需要输入密码确认. 不过通过建立信任关系,可以实现不输入密码. 这里假设A的IP ...
- NOIP201105铺地毯
NOIP201105铺地毯 [问题描述]为了准备一个独特的颁奖典礼,组织者在会场的一片矩形区域(可看做是平面直角坐标系的第一象限)铺上一些矩形地毯.一共有n 张地毯,编号从1 到n.现在将这些地毯按照 ...
- Elasticsearch--Date math在索引中的使用
在Elasticsearch,有时要通过索引日期来筛选某段时间的数据,这时就要用到ES提供的日期数学表达式 描述: 特别在日志数据中,只是查询一段时间内的日志数据,这时就可以使用日期数学表达式,这样可 ...
- JVM参数配置的线上教训
原来规则处理业务五十台服务器经常大量fgc,load飙高,我修改了jvm配置后,五十台服务器十多天没有任何异常,双十一中轻闲度过. 可是今天突然又有一台大量fgc,load飙高.分析了半天,回头一看, ...
- nginx 优化
隐藏nginx版本号:在http标签内写server_tokens off; 隐藏apache版本号:ServerTokens Prod ServerSignature Off 更改nginx默认的用 ...
- /etc/passwd /etc/shadow
一./etc/passwd/etc/passwd 文件是一个纯文本文件,每行采用了相同的格式: name:password:uid:gid:comment:home:shell name 用户登录名 ...