Hi everyone, I have two threads: - the main one in charge of the UI - a second one that takes care of network calls, parsing responses and database updates.
The main threads open the database, retrieves information into a Cursor that is used to feed a listView. My problem is the following: When I close the application the activity is destroyed, the second thread can still be running and thereby still can update the DB. Since the main thread open the DB, I want to close it to do the stuffs properly. However if I close it within the onDestroy method and if the second thread is running and is about to update the DB, I get an error. What is the best way to handle this situation? Thanks a lot Polo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

