I\'ve written a ListActivity that has a custom list adapter. The list is being updated from a ContentProvider when onCreate is run. I also have a service that gets started
If you want to update the UI listview from a service then you should call notifyDataSetChanged() on onDestroy of the service
make the adapter static from your main activity and call that adaptername.notifyDataSetChanged()
like this
@Override
public void onDestroy() {
if (MainActivity.isInFront == true) {
if (MainActivity.adapter != null)
MainActivity.adapter.notifyDataSetChanged();
MainActivity.listView.setAdapter(MainActivity.adapter);
}
}