ProgressDialog no se muestra cuando AsyncTask.get () llamó [duplicar]

Posible duplicado:
AsyncTask bloquea la amenaza de la interfaz de usuario y muestra la barra de progreso con retraso

Quiero mostrar un Diálogo de progreso mientras recupero JSON de cualquier servidor. Así que había usado AsyncTask como solución (no estoy seguro de una salida diferente).

Todo está bien, el ProgressDialog funciona correctamente hasta que llamo al método .get () usando la instancia AsyncTask. Supongo que está bloqueando la interfaz de usuario de alguna manera. Aquí está mi AsyncTask:

public class myAsync extends AsyncTask<String, String, List> {

    String message; // for dialog message
    ProgressDialog progress; 
    Intent myIntent;
    Context ctx;

    public myAsync(String message, Context ctx) {
        this.message = message;
        this.ctx = ctx;
        progress = new ProgressDialog(ctx);
    }

    @Override
    protected void onPreExecute() { 
        progress.setMessage(message);
        progress.setIndeterminate(true);
        progress.setCancelable(false);
        progress.show();    
    }

    @Override
    protected List doInBackground(String... params) {
        //returns any list after the task
        return anyList; 
    }

    @Override
    protected void onPostExecute(List result) {
        if(progress.isShowing())
            progress.dismiss();
    }
}

Y aquí está myActivity, que se llama AsyncTask:

myAsync asyncTask = new myAsync("Loading...", this);
asyncTask.execute("Any string", "Other string");
asyncTask.get(); // If I comment out this line, ProgressDialog works

Después de ejecutar, cuando intenté registrar el resultado de doInBackground y onPostExecute, no hubo ningún problema. Pero si quiero obtener con .get () el resultado ProgressDialog no se muestra o se muestra tan poco tiempo (tal vez 0.2 segundos)

¿Cuál es el problema

Respuestas a la pregunta(8)

Su respuesta a la pregunta