Activity is closed when AsyncTask is using database
<p>My Activity opens a database in onResume() and close it in onPause(). When Activity starts, many AsyncTasks which use that database execute. When I pressed Back button, database was closed and errors appear because AsyncTask is using it. What is solution for this problem?</p>
