Hi I am getting force close in my applcation.
Error - View Not attached to window manager.
//asynctask for groupnames
class GroupDataLoad extends AsyncTask<Void, Void, Void>{
@Override
protected void onPreExecute() {
// TODO Auto-generated method stub
super.onPreExecute();
mCustomProgressDialog = CustomProgressDialog.createDialog(
UserMenuActivity.this, "", "");
mCustomProgressDialog.show();
mCustomProgressDialog.setCancelable(false);
}
@Override
protected Void doInBackground(Void... params) {
// TODO Auto-generated method stub
dbHelper = new DatabaseHelper(UserMenuActivity.this);
//getting the group list
mXMPPConn.getContactList();
ParseValues.parsedGroupList.clear();
APIVariables apiVariables = new APIVariables();
ParseValues.getGroupList(apiVariables.getGroupList("abc.com"));
int size = ParseValues.parsedGroupList.size();
for(int i=0;i<size;i++){
String groupName = ParseValues.parsedGroupList.get(i).getGroup_name();
if(CGMStaticVariable.CommonConnection.isConnected())
{
createRoom(groupName, CGMStaticVariable.CommonConnection);
}
}
return null;
}
@Override
protected void onPostExecute(Void result) {
// TODO Auto-generated method stub
super.onPostExecute(result);
setExpandableListView();
mCustomProgressDialog.dismiss();
}
}
When loading starts, I change the forground page by clicking on the notification from the status bar and when I click BACK button to come to the same activity again, it crashes saying - "View not attached to window manager"
I am unable to figure out what the problem actually is
Thanks