Code example for AsyncTaskLoader

	protected Cursor mCursor;
	// When constructed, we open the database 
	public DatabaseCursorLoader(Context _context, String _eventToFilter) 
		mDatabaseAdapter = new DatabaseAdapter(getContext());
		mEventToFilter = _eventToFilter;
	protected DatabaseAdapter getDatabaseAdapter() 
		return mDatabaseAdapter;
	// When the LoaderManager inits a load, we must call the 
	// forceLoad() method from AsyncTaskLoader. Doing that, we  
	// are launching a new thread, that will execute the  
	// loadInBackground method 
Experience pair programming with AI  Get Codota for Java