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 -- 自定义View小Demo(一)
1,现在要实现下图的简单效果,很简单 ,就是使用paint在canvas上绘制5中不同颜色的圆圈,效果图如下: 这是绘制基本图形一种最简单的方法,下面是它的代码 ,注释写的很详细,也就不去讲解了 M ...
- Java生成excel导出文件(使用poi+JXL)
1.使用poi生成文件 package com.mi.entity; import java.util.Date; public class Student { private int id; pri ...
- 认识Swift
Swift 是一门新的编程语言,用于编写 iOS 和 OS X 应用程序.Swift 结合了 C 和 Objective-C 的优点并且不受C兼容性的限制.Swift 使用安全的编程模式并添加了很多新 ...
- java使用ffmpeg和mencoder做视频格式转换
首发:个人博客,持续更新和纠错 主要使用技术:1)FFmpeg,用于主流格式之间的转换,例如AVI,MP4,FLV等.2)MEncoder,用于奇葩格式转主流格式,例如RMVB转AVI.这样我们可以把 ...
- UIView的ContentMode
UIViewContentMode typedef enum { UIViewContentModeScaleToFill, UIViewContentModeScaleAspectF ...
- Spring之AOP面向切片
一.理论基础: AOP(Aspectoriented programming)面向切片/服务的编程,在Spring中使用最多的是对事物的处理.而AOP这种思想在程序中很多地方可以使用的,比如说, ...
- OSAL
1. CC254x的软件基于OSAL架构 2. OSAL并非一个真的操作系统, 而只是让软件设立一个事件的执行方法(setup excution of events) 3. 每一个子系统都在OSAL的 ...
- NLog
C# 使用NLog记录日志 C#第三方日志库Nlog NLog类库使用探索——详解配置 使用Nlog记录日志到数据库 NLog文章系列——系列文章目录以及简要介绍 NLog日志框架简写用法(write ...
- Eclipse如何设置字体
Eclipse 是一个开放源代码的.基于Java的可扩展开发平台,是学习java和开发java最常用的IDE之一.有时候会遇到这种情况,刚刚下载了新的Eclipse,字体显示英文没问题,但是显示中文就 ...
- PHP高级架构技术年度大盘点
2015年1月的最后一个周末,上海的冬季虽不如北方的雪窖冰天,但腊月的寒风也足以让人猫 在家中不愿出门.可是,在华美达酒店的一个会议室中,却人声鼎沸.春意融融,第三期商派技术沙龙正在火热进行,本期沙龙 ...