Can't get website using jsoup on Android
<p>I have a problem with getting website with jsoup on Android.</p>

<pre><code>public class Parser
{
    Parser()
    {
        new Parser1().execute();
    }

    class Parser1 extends AsyncTask&lt;Void, Void, Void&gt;
    {
        String website1 = "http://google.com";
        Document doc;

        @Override
        protected void onPreExecute()
        {
            super.onPreExecute();
        }
</code></pre>

<p>This code is not execute doInBackground method. </p>

<pre><code>        @Override
        protected Void doInBackground(Void... params)
        {
            try
            {
                doc = Jsoup.connect(website1).get();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }

            return null;
        }
</code></pre>

<p>And the rest of code.</p>

<pre><code>        @Override
        protected void onProgressUpdate(Void... values)
        {
            super.onProgressUpdate(values);
        }

        @Override
        protected void onPostExecute(Void result)
        {
            Log.d ("OK",doc.toString());

            super.onPostExecute(result);
        }

        @Override
        protected void onCancelled()
        {
            super.onCancelled();
        }
    }
}
</code></pre>

<p>I tried to write code without class AsyncTask, but always on Json.connect the program was exception. 
Thanks for all replies.</p>