Question: I have a tabgroup having multiple activities. In one of the tabs i have two activities between whom i want to place a progress dialog.For this i am using Asynk Task. Following is my AsynkTask class which i have made an inner class for AboutUs activity: 

```
private class TheTask extends AsyncTask<Void, Void, Void>{

    @Override
    protected void onPreExecute() {
        progDialog = ProgressDialog.show(AboutUs.this.getParent(), "Loading... ",
                "please wait....", true);
    }

    @Override
    protected Void doInBackground(Void... params) {
        final Intent aboutusIntent = new Intent(getParent(), Departments.class);
        final TabGroupActivity parentActivity = (TabGroupActivity)getParent();
        parentActivity.startChildActivity("Departments", aboutusIntent);
        return null;
    }

    @Override
    protected void onPostExecute(Void result) {

        if(progDialog.isShowing())
        {
        progDialog.dismiss();
        }
    }
}  

```

I am calling this class in my AboutUs activity : 

```
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.aboutus);
         .  
         .  
         .  
         .  
/* Button for going to Departments */
    Button ourdepbtn = (Button) findViewById(R.id.departmentsbutton);
    ourdepbtn.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            // TODO Auto-generated method stub
            //ourDepartments();
            new TheTask().execute();
            return false;
        }
    });
}  

```

However this does'nt start a new activity i.e. Departments. The progress dialog appears and then disappears but activity never loads.  

Any suggestions..??

Answer: 
You can just let your method return the JSON String if you use the `@ResponseBody` annotation and use one of the methods listed in the answers to my previous question:

> 
> [In Spring MVC, how can I set the mime
>  type header when using
>  `@ResponseBody`](https://stackoverflow.com/questions/4471584/in-spring-mvc-how-can-i-set-the-mime-type-header-when-using-responsebody)
> 
> 
>
I'm a total newbie but I've read some where that when you dont specify any logical view mapping for a controller and you return a model map from a handler method (`@Controller`, `@RequestMapping`) it should transform the model object to json and return it.