Android fast running sqlite query
I'm using a database for searching and facing followi开发者_开发问答ng issue.
When new search string comes I need to block the previously executing database query.
How can I do this?
You cannot stop a query as the request to the database is synchronous. But you can try to exclude the request to the database into a thread so you can stop the thread when a new request should be done.
Anyway it would be a good idea to do the query in a thread oder AsyncTask so you don't block the UI when querying the database.
精彩评论