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 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
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.*;中介绍。
更多精彩
赞助商链接