I'm having a hard time to connect the application to the internet and retrieve the html source. Been looking all over for a solution and didn't find. Hope someone could help. Here is my code:
public class Main extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final EditText et = (EditText) findViewById(R.id.editText1);
        final Button b = (Button) findViewById(R.id.button1);
        final TextView tv = (TextView) findViewById(R.id.textView1);
        b.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                try {
                    URL url=null;
                    url = new URL(et.getText().toString());
                    URLConnection conn = url.openConnection();
                    BufferedReader reader = new BufferedReader(
                            new InputStreamReader(conn.getInputStream()));
                    String line = "";
                    while ((line = reader.readLine()) != null) {
                        tv.append(line);
                    }
                } catch (Exception e) {
                }
            }
        });
    }
I've also added INTERNET permission..
 
     
     
     
    