WEB开发网
开发学院手机开发Android 开发 Android 主要概念总结归纳 阅读

Android 主要概念总结归纳

 2010-02-23 15:54:00 来源:WEB开发网   
核心提示:* vnd.android.cursor.dir/vnd.yourcompanyname.contenttype for multiple rows. For example, a request for all train records usingcontent://com.example.transportati

* vnd.android.cursor.dir/vnd.yourcompanyname.contenttype for multiple rows. For example, a request for all train records using

content://com.example.transportationprovider/trains

might return the MIME type vnd.android.cursor.dir/vnd.example.rail

For an example of a private content provider implementation, see the NodePadProvider class in the notepad sample application that ships with the SDK.

Here is a recap of the important parts of a content URI:

Elements of a content URI

1. Standard required prefix. Never modified.

2. Authority part. For third-party applications, this should be a fully-qualified class to ensure uniqueness. This corresponds to the value in the element's authorities attribute:

3. The path that the content provider uses to determine what kind of data is being requested. This can be zero or more segments: if the content provider exposes only one type of data (only trains, for example), this can be absent. If it provides several types, including subtypes, this can be several elements long: e.g., "land/bus, land/train, sea/ship, and sea/submarine" to give four possibilities.

4. A specific record being requested, if any. This is the _id value of a specific record being requested. If all records of a specific type are being requested, omit this and the trailing slash: content://com.example.transportationprovider/trains

android中网路数据操作部分和java中网路操作部分是一样的,即在包java.net.*;中介绍。

上一页  3 4 5 6 7 8 

Tags:Android 主要 概念

编辑录入:coldstar [复制链接] [打 印]
赞助商链接