I am using adapter where my data stored in the arraylist and added in the adapter,hence i am calling the adapter in ui thread,hence this adapter calls when the user clicks the start button.when the user switch to another activity from same and returning to the same activity my list view got cleared. This is the button function ,while clicking this it will start the service.
Intent start_service = new Intent(MyTrip.this, AppLocationService.class);
startService(start_service);
Hence it call this adapter for every 5min
My adapter is
Adapter = new MyTrip_listview_Adapter(MyTrip.this, location, Date_Array, imagesview, j, context, arrayplaces);
listViewplace.setAdapter(adapter);
listViewplace.setSelection(location.size() - 1);
adapter.notifyDataSetChanged();