In this case you need an AsyncQueryHandler instead of AsyncTask.
Give the SimpleCursorAdapter a null cursor and set autoRequry to
false. Query database with AsyncQueryHandler.startQuery() and set the
cursor to the adapter when query completed.

--Scott
On Dec 27, 3:23 pm, Realm X <[email protected]> wrote:
> Hi Android Devs,
>
> Can anyone point me to a good example where a AsyncTask queries a
> local SQLite database and then updates the UI successfully. I have a
> database which I query using doInBackground... create a new custom
> SimpleCursorAdapter (overriding onViewBind), return the adapter
> (SimpleCursorAdapter), then in postExecute() create ListView adapter
> which is set to the the SimpleCursorAdapter, that was returned, then I
> set the listview adapter using SetAdapter(adapter);...
>
> For some reason I throw an exception on fillWindow.java:200....
>
> Can anyone help me with the matter.
>
> Thanks!
> Longshore

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