How to programmatically stop a long-running query?

The long-running step is, for example, the first call to
Cursor.moveToFirst(). This can sometimes take up to 30 seconds so I
would like the user to be able to cancel.

However, how should this be done? I've tried closing the Cursor (in
another thread) but all that happens is that the close() call takes as
long as moveToFirst() and then terminates with the exception:

java.lang.IllegalStateException: attempt to acquire a reference on a
close SQLiteClosable



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to