I am implementing synronous class in back ground process I am getting some results. These results are stored in array list in post execute method. How can I retrieve these results?
Code file
public class DownLoanPhoto extends AsyncTask
{
protected void onPreExecute()
{
super.onPreExecute();
}
protected Object doInBackground(Object... params)
{
ArrayList hhh=new ArrayList();
hhh.add(PersonImage);
hhh.add(layoutmsg);
hhh.add(personName);
hhh.add(msgImage);
hhh.add(layoutPersonImage);
Bundle bbb=new Bundle();
bbb.putStringArrayList("val", hhh);
onPostExecute(bbb);
}
return params;
}
@Override
protected void onPostExecute(Object result)
{
//How to retrieve that array list results?
layoutPersonImage.addView(msgImage);
layoutPersonImage.addView(PersonImage);
layoutPersonImage.addView(personName);
ll1.setBackgroundResource(R.drawable.tabmessage);
ll1.setGravity(Gravity.CENTER);
ll1.addView(layoutPersonImage);
((LinearLayout)findViewById(R.id.LinearlayoutMessage)).addView(ll1);
}
}
There is no need of calling
onPostExecuteindoInBackgroundit will be automatically called.