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
Use HttpGet()
. Here is an Android example:
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.