How to show progress dialog using AsyncTask in a class that yet extends MapActivity
===

I have a program that search some elements and show these on a GoogleMap.
I want to show a progress dialog before the end of all procedures that set the various geopoint on the map.

Searching I have found this code to show the progress dialog before the end of a method.

        ProgressDialog dialog; 
    private class Test extends AsyncTask<Void, Void, Void> { 
     
        @Override 
        protected void onPreExecute() { 
            dialog = new ProgressDialog(Main.this); 
            dialog.setMessage("Loading...."); 
            dialog.setIndeterminate(true); 
            dialog.setCancelable(true); 
            dialog.show(); 
        } 
     
        @Override 
        protected Void doInBackground(Void... voids) { 
            try { 
                runOnUiThread(new Runnable() { 
                    public void run() { 
     
                    } 
                }); 
                //your code 
     
        } 
     
        @Override 
        protected void onPostExecute(Void params) { 
            dialog.dismiss(); 
            //result 
     
        } 
    } 


The problem is that my class extends yet MapActivity and I cannot use multiple inheritance to extend another class. 
How could I do to solve the problem?