ContentProvider官方教程(4)ContentResolver权限
Content Provider Permissions
A provider's application can specify permissions that other applications must have in order to access the provider's data. These permissions ensure that the user knows what data an application will try to access. Based on the provider's requirements, other applications request the permissions they need in order to access the provider. End users see the requested permissions when they install the application.
发布provider的应用可以给它指定个权限,没有这个权限,外部应用不可访问这个provider。
If a provider's application doesn't specify any permissions, then other applications have no access to the provider's data. However, components in the provider's application always have full read and write access, regardless of the specified permissions.
如果没有定义权限,那么只能本应用内访问这个 provider。
As noted previously, the User Dictionary Provider requires the android.permission.READ_USER_DICTIONARY permission to retrieve data from it. The provider has the separate android.permission.WRITE_USER_DICTIONARY permission for inserting, updating, or deleting data.
To get the permissions needed to access a provider, an application requests them with a <uses-permission> element in its manifest file. When the Android Package Manager installs the application, a user must approve all of the permissions the application requests. If the user approves all of them, Package Manager continues the installation; if the user doesn't approve them, Package Manager aborts the installation.
The following <uses-permission> element requests read access to the User Dictionary Provider:
<uses-permission android:name="android.permission.READ_USER_DICTIONARY">
The impact of permissions on provider access is explained in more detail in the Security and Permissions guide.
ContentProvider官方教程(4)ContentResolver权限的更多相关文章
- ContentProvider官方教程(5)ContentResolver插入、更新、删除 示例
Inserting, Updating, and Deleting Data In the same way that you retrieve data from a provider, you a ...
- ContentProvider官方教程(3)ContentResolver查询、遍历 示例
Retrieving Data from the Provider This section describes how to retrieve data from a provider, using ...
- ContentProvider官方教程(9)定义一个provider完整示例:实现方法,定义权限等
Creating a Content Provider In this document Designing Data Storage Designing Content URIs Implement ...
- ContentProvider官方教程(7)3种访问形式:批处理、异步访问、intent间接访问(临时URI权限)
Alternative Forms of Provider Access Three alternative forms of provider access are important in app ...
- ContentProvider官方教程(2)简介、Content URIs
In this document Overview Accessing a provider Content URIs Content Provider Basics A content provid ...
- ContentProvider官方教程(10)<provider>元素及属性介绍
The <provider> Element Like Activity and Service components, a subclass of ContentProvider mus ...
- ContentProvider官方教程(1)何时用content provider
Content Providers Content providers manage access to a structured set of data. They encapsulate the ...
- ContentProvider官方教程(6)provider支持的数据类型
Provider Data Types Content providers can offer many different data types. The User Dictionary Provi ...
- ContentProvider官方教程(11)Calendar Provider、Contacts Provider、Storage Access Framework
Calendar Provider: guide/topics/providers/calendar-provider.html Contacts Provider: guide/topics/pro ...
随机推荐
- JSon_零基础_004_将Set集合对象转换为JSon格式的对象字符串,返回给界面
将Set集合对象转换为JSon格式的对象字符串,返回给界面 需要导入的jar包: 编写:servlet: package com.west.webcourse.servlet; import java ...
- paper 44 :颜色矩和颜色相关图(color correlogram)
- angular 倒计时
$scope.countdown = ; var myTime = setInterval(function() { $scope.countdown--; $scope.$digest(); // ...
- 包括post,get请求(http,https)的HttpClientUtils
package cn.knet.data.untils; import java.io.IOException; import java.net.SocketTimeoutException; imp ...
- oracle随机取数据
select * from (select rownum,KEYWORD, CATEGORY,CREATE_DATE,UPDATE_DATE from (select * from knet_keyw ...
- DMA-330(一)
DMA Controller的interface: DMA Controller提供这些feature: 1)instruction set,对DMA transfer进行program 2)AXI ...
- yii2开启session
1.在写入session的页面. use yii\web\Session;$session = new Session;$session->open(); 2.在获取session的页面 use ...
- JS中数组的操作
1.数组的创建 var arrayObj = new Array(); //创建一个数组 var arrayObj = new Array([size]); //创建一个数组并指定长度,注意不是上限, ...
- SqlServer中使用Select语句给变量赋值的时候需要注意的一个问题
我们知道在SqlServer中可以用Select语句给变量赋值,比如如下语句就为int类型的变量@id赋值 ; select @id=id from ( as id union all as id u ...
- 锋利的JQuery(五)
jQuery与Ajax: load: load(url) $("#resText").load("test.html") 加载所有元素 load(url ...