Using Internet data in an Android application

Source: Internet
Author: User
Tags json object model web services java web

Common abbreviations

Ajax:asynchronous JavaScript + XML

API: Application Programming Interface

CSV: comma-separated values

CSS: Cascading Style Sheets

DOM: Document Object Model

HTML: Hypertext Markup Language

HTTP: Hypertext Transfer Protocol

IDL: Interface Description Language

Json:javascript Object identification

Sax:xml Simple API

SDK: Software Development Kits

UI: User Interface

URL: Uniform Resource Locator

XML: Extensible Markup Language

3g: Third generation mobile phone technical standard

Android applications must access data that is located on the Internet, and Internet data can be in several different formats. This article describes how to use three data formats in an Android application:

Xml

Json

Google's protocol buffers

Start by developing a Web service that converts CSV data into XML, JSON, and protocol-buffers formats. Then build a sample Android application that extracts the data from a WEB service in any format and parses it and displays it to the user.

To do the exercises in this article, you need the latest Android SDK and Android 2.2 platform. The SDK also requires you to install a Java™ Development Kit (JDK), and JDK 1.6.0_17 is used in this article. You do not need to have an Android physical device; All code will run in the Android emulator of the SDK. This article does not teach you how to develop Android, so it is recommended that you be familiar with Android programming. Of course, only the knowledge of the Java programming language can also complete the study of this article.

You also need a Java Web application server to run the Web services that the Android application uses. In addition, you can deploy server-side code to Google App Engine. See the Downloads section for complete source code.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.