简体   繁体   中英

How can I make an app access a website to get information?

I want to make an app that can access a website and extract information from it. How would I go about doing that?

Simple case is just openning an HTTP Connection to the site and then redirecting the data to an input buffer and reading everything. Here is an example:

http://download.oracle.com/javase/tutorial/networking/urls/readingWriting.html

If you are in control of the website I recommend you to take a look on JSON or XML.

You can use the Apache HTTP that's included on Android.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM