My goal is to retrieve the headline from the Wall Street Journal
website (http://online.wsj.com/home-page) and put in in my application on the touch of a button. Here is what I have done so far:
public class NewsFeed extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstasnceState);
setContentView(R.layout.activity_newsfeed);
HttpGet httpGet = new HttpGet('http://online.wsj.com/home-page');
final String headline = String.valueOf(httpGet);
button1.setOnClickListener (new View.OnClickListener() {
@Override
public void onClick (View v) {
textview1.setText(headline);
}
});
}
}
How can I change my code so that it correctly displays website information?