I don’t know what the proper name for this sort of programming, but all I am want to do is the following:
Let’s say I want to use google translate service so I created an application either (android apps, or some local application that is Java that run on my local machine) and in this application I wanted to type a word and when I hit find, I need my application to go an input the word into google translate and bring me the result to my application.
the google translate is just an example so I want to know the general path that I should use to create such software
Another example to make things clear, for an android App what is the proper name and the proper way to create an app that uses the http://www.flickr.com/ to pick random pictures and display them and when the user hit refresh button another set of new pictures will show up
so you see, in the second example, I am trying to menipulate a website to get some spacific feature from it, instead of displaying the entire website.
I am aware of the copywriter and asking for permission from the owners of the website before doing such thing if this is consider to be illegal.
Thanks
I understand that you need to connect to a website, download the webpage (the html file) and process it, in order to show the user the results of this processing.
I think that you can use two different classes:
– HttpURLConnection: it’s included in java.net. He goes a link with an example:
http://www.androidsnippets.com/http-requests-with-java-api-urlconnection
– HttpGet and HttpPost: included in Android. A link with an example:
http://w3mentor.com/learn/java/android-development/android-http-services/example-of-http-get-request-using-httpclient-in-android/
Which one to use? I’m afraid it depends on your project. With HttpURLConnection you can have more control over the http commands (i. e. you can send a HEAD command).