I am implementing a library function that performs a query on the database and this query can sometime be long enough to cause a StrictMode
warning for a long operation on the UI thread.
I was wondering what would it be the right pattern to apply here? How can I wrap an asynchronous call in a function which result is expected to be synchronous?
The function gets a table name and column and returns a boolean using the normal Cursor
/ resolver.query pattern
functionalities. I can add the code if needed.
Thanks a lot, Andrea