title: Android: access database using different thread
body: <p>I have a class "A" that has to setup table according to data from DB. Managing database is done using class "B". Class "B" has method "getAllData" that returns a cursor. So, class "A" calls "getAllData" from class "B", and using returned cursor it populates tablelayout with data. It works, but there's a problem -> it works so slow! I want to query my DB using another thread.
  Googling around i found something about "AsyncQueryHandler" but i'm puzzled. When "AsyncQueryHandler" gets a cursor (reads data from DB), how can i notify class "A" that data is ready? How can i return cursor from "AsyncQueryHandler" to class "A"?</p>