[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
执行网络操作概览
本课程介绍了下述操作中所涉及的基本任务:连接到网络、监控网络连接(包括连接更改)以及让用户控制应用的网络使用情况,还介绍了如何解析和使用 XML 数据。
通过这几节课的学习,您将掌握一些基本构建块,供您创建能够高效下载内容和解析数据的 Android 应用,同时最大限度地减少网络流量。
注意:Volley 是一个可让 Android 应用更轻松快捷地联网的 HTTP 库。如需了解 Volley 的信息,请参阅使用 Volley 传输网络数据课程。Volley 可在 GitHub 上获取。Volley 或许能够帮助您优化并改善应用的网络操作性能。
如需详细了解此主题,请参阅以下相关指南:
课程
- 连接到网络
- 了解如何连接到网络,选择 HTTP 客户端,以及在界面线程外部执行网络操作。
- 管理网络使用情况
- 了解如何查看设备的网络连接,创建用于控制网络使用情况的偏好设置界面,以及响应连接更改。
- 解析 XML 数据
- 了解如何解析和使用 XML 数据。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-03-16 UTC.