How can I get and show content from url by pressing a button in android? The button is in xml, and I need to show display information below.
Button --> information from http://www.bovalpo.com/cgi-local/xml_bcv.pl?URL=1
My wrong code:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bovalpo);
Button ButtonOne = (Button)findViewById(R.id.btn);
ButtonOne.setOnClickListener(new OnClickListener() {
public void onClick(View arg0) {
Intent viewIntent =
new Intent("android.intent.action.VIEW",
Uri.parse("http://www.bovalpo.com/cgi-local/xml_bcv.pl?URL=1"));
startActivity(viewIntent);
}
});