In my Android application, the user can populate the database with imported data, and then execute a predefined complex SQL query. With some data template, the request will take a very long time (minutes or more on HTC Hero), while normal use will not exceed 10-15 seconds.
Is there a way to cancel a pending SQLite query on Android? A timeout will also be good, partial results are not required. I execute the request inAsyncTask.doInBackground()
I know that the best way is to optimize the query or change the application logic, but in this case, the results still depend on user knowledge, so I would like to help those who introduce an unpleasant template.
source
share