Implementing AsyncQueryHandler

tyczj picture tyczj · Aug 15, 2012 · Viewed 13.1k times · Source

I am trying to implement AsyncQueryHandler because I am experiencing the same exact problem in this link but I dont see any example or anything about implementing it.

I tried doing

AsyncQueryHandler handler = new AsyncQueryHandler(getContentResolver());

since that is what the constructor shows in the docs but I get an error saying cannot instantiate the type AsyncQueryHandler so how do I use it then?

Answer

Crossle Song picture Crossle Song · Nov 13, 2012

It's so convenient:

AsyncQueryHandler handler = 
    new AsyncQueryHandler(mActivity.getContentResolver()) {};
handler.startUpdate(-1, null, sessionUri, values, null, null);