I'm new to android I want to download `images` from web to my emulator I have seen 
[This](https://stackoverflow.com/questions/15271245/asynctask-does-not-execute-in-oncreate), my problem is also as it is. but I have done this :

```
public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    new MyAsnyc().execute();
}   

public class MyAsnyc extends AsyncTask<Void, Void,Void>{
    public  File file ;
    InputStream is;
    protected void inBackground() throws IOException{

        File path = Environment.getExternalStoragePublicDirectory(
                Environment.DIRECTORY_PICTURES);
        file = new File(path, "DemoPicture.jpg");
        try{
            // Make sure the Pictures directory exists.
            path.mkdirs();

            URL url = new      URL(BASE_URL);
            /* Open a connection to that URL. */
            URLConnection ucon = url.openConnection();

            /*
             * Define InputStreams to read from the URLConnection.
             */
            is = ucon.getInputStream();

            OutputStream os = new FileOutputStream(file);
            byte[] data = new byte[is.available()];
            is.read(data);
            Log.d("MY_TAG>>>", "Picture is Readable...");
            os.write(data);
            Log.d("MY_TAG>>>", "Picture is Saved...");
            is.close();
            os.close();

        }
        catch (IOException e) {
            Log.d("ImageManager", "Error: " + e);
        }
    }
    @Override
    protected Void doInBackground(Void... params) {
        // TODO Auto-generated method stub

        try {
            inBackground();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        return null;
    }
    protected void onPostExecute()
    {

        try
        {
            // Tell the media scanner about the new file so that it is
            // immediately available to the user.

            MediaScannerConnection.scanFile(null,
                    new String[] { file.toString() }, null,
                    new MediaScannerConnection.OnScanCompletedListener() {
                public void onScanCompleted(String path, Uri uri) {
                    Log.i("ExternalStorage", "Scanned " + path + ":");
                    Log.i("ExternalStorage", "-> uri=" + uri);
                }
            });
        }
        catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
}

```

}

but my `AsyncTask` is never called please any one help me how to solve this and how to download image from web.