android connection error
<p>I am a newbie to android... I have an application that needs to connect to the internet with string(url).get data and set it to global variable. This is my method to do it and my connector class.</p>

<p>I need some help.</p>

<pre><code>public void getWether(){

    Thread wether_thread = new Thread(new Runnable() {

        @Override
        public void run() {
            InputStream wether_is;
            try {
                Log.e("check wether","try bracktes");
                wether_is = _conn.getConnect(RiyadURL);
                wether_result = xmlParser.parseWeather(wether_is);
                global.setCityName(getString(R.string.Riyad_city));
                global.setCityTempreture(wether_result.getForeCast_array().get(0).getHigh().toString());
                runOnUiThread(new Runnable(){

                    @Override
                    public void run() {
                        Log.e("ui thread","run bracktes");
                        city.setText(global.getCityName());
                        wethet_temperature.setText(global.getCityTempreture()+"C");
                    }
                });
            } catch (ConnectionException e) {
                e.printStackTrace();
                Log.e("check wether","catch bracktes");
            }

        }
    });
    wether_thread.start();
}
</code></pre>

<p>and my connector class</p>

<pre><code>public class ConnectorImpl implements ConnectorInterface{

    @Override
    public InputStream getConnect(String url) throws ConnectionException{
        try {
            URL sourceUrl = new URL(url );
            //Log.e("url in conn",url);
            InputStream wether_is=sourceUrl.openConnection().getInputStream();

            Log.e("is in conn",""+wether_is.toString());
            return wether_is;
        } catch (Exception e) {
            // TODO Auto-generated catch block
            throw new ConnectionException(1, "no internet Connection");
        }
    }
}
</code></pre>
