Problem with getting source code of page
<p>I'm new in Java and in programming on android. Have a look at this code:</p>

<pre><code>TextView tv = new TextView(this);
URI uri;
HttpResponse response = null;
String str = "dupa2";
try {
    uri = new URI("http://google.com");
    HttpGet get = new HttpGet(uri);
    HttpClient client = new DefaultHttpClient();
    try {
        response = client.execute(get);
        HttpEntity enity = response.getEntity();
        str = enity.toString();
        str = "2";
    } catch (IOException ex) {
        tv.setText("blad");
        Logger.getLogger(MainActivity.class.getName()).log(Level.SEVERE, null, ex);
    }
} catch (URISyntaxException ex) {
    tv.setText("blad");
    Logger.getLogger(MainActivity.class.getName()).log(Level.SEVERE, null, ex);
}
tv.setText(str);
setContentView(tv);
</code></pre>

<p>It doesn't work and i dont have idea why :/ str value is "dupa2" when it should be "2" (i added it because i didnt know whats going on) or "blad") WTF? </p>

<p>Must I add that try...catch statements?
Thanks in advance,
Chris</p>
