android-Creating a Content Provider(2)
2015-11-28 19:04
381 查看
For content URIs that point to a row or rows of table data,
return a MIME type in Android's vendor-specific MIME format:
Type part:
Subtype part:
If the URI pattern is for a single row:
If the URI pattern is for more than one row:
Provider-specific part:
You supply the
URI pattern. A good choice for
Attributes that specify the permissions that other applications must have in order
to access the provider's data:
flag.
permission.
permission.
permission.
Permissions and their corresponding attributes are described in more detail in the section Implementing
Content Provider Permissions.
getType()should
return a MIME type in Android's vendor-specific MIME format:
Type part:
vnd
Subtype part:
If the URI pattern is for a single row:
android.cursor.item/
If the URI pattern is for more than one row:
android.cursor.dir/
Provider-specific part:
vnd.<name>.
<type>
You supply the
<name>and
<type>. The
<name>value should be globally unique, and the
<type>value should be unique to the corresponding
URI pattern. A good choice for
<name>is your company's name or some part of your application's Android package name. A good choice for the
<type>is a string that identifies the table associated with the URI.
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.
相关文章推荐
- Android知识总结:Universal-Imageloader学习笔记1 基本功能与配置
- Android系统源码下载过程
- android中用Spannable在TextView中设置超链接、颜色、字体
- Android环境的搭建
- Android播放视频
- Android Studio手把手——帮你了解Gradle
- android---logcat
- Android的绘图机制学习---自定义View
- Android使用AlarmManager全局定时器实现定时更换壁纸
- android-Creating a Content Provider
- 【分享】Android Studio专用文件转换工具:把ANSI文件批量另存为无BOM的UTF-8文件
- Android验证码简单设计
- Activity 生命周期回顾 onSaveInstanceState()
- Android逆向之旅---静态分析技术来破解Apk
- android生命周期:activity
- Android兼容性问题 -- RelativeLayout.mesure()出现NullPointerException异常
- Android自定义view以及组合view
- android MotionEvent
- Android开发中getleft和getX,getRawX的区别
- Android开源BezierView:仿QQ未读消息99+条的红色气泡