I am new with android development.I am creating an app that will tell the meaning of name entered by user, for this I am using www.babynamesworld.parentsconnect.com to fetch the data and parse the meaning of name out of it.Here is the code but it doesn't seem to work.
Button b=(Button)findViewById(R.id.button1);
b.setOnClickListener(new Button.OnClickListener()
{
TextView tv=(TextView)findViewById(R.id.textView1);
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
try {
EditText et=(EditText)findViewById(R.id.editText1);
Document document = Jsoup.connect("http://babynamesworld.parentsconnect.com/meaning_of_"+et.getText().toString()+".html").get();
Element firstMeta = document.select("meta").first();
String title = firstMeta.attr("DESCRIPTION");
tv.setText(title);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}});
}
As soon I click on the button, program crashes. I've added internet access permission too.