i have make one android application in that data is coming from server so it\'s time consuming process so i have created one progress dialog box..
below is my code
You are starting the asynctask every time you show your activity. So, you should cancel the task when exiting (AsyncTask.cancel(true)), or check if it is still running in the onResume method.
In the cases where you get the error onResume() gets called again, starting a new AsyncTask. Now you have multiple AsyncTask simultanously accessing and altering the size of nearDeals.results (you call remove on it). When one asyncTask removes an item from the list, the second asyncTask may run into the ArrayIndexOutOfBounds since the list size has changed.
EDIT: It's actually not the removal of an item, but that you set a new instance of the list in googlePlaces.search and this list may have a different size than the one used by the old asynctask.
Solution: call cancel on your running async tasks in onPause (or in onResume before starting the new task)