Code example for AsyncTaskLoader

0
	 * Constructor 
	 * Initializes the content observer 
	 * @param context Application context 
	 */ 
	public DatabaseCursorLoader(Context context) {
		super(context);
		mObserver = new ForceLoadContentObserver();
	} 
 
	/** 
	 * Asynchronously loads the results from the database.  
	 */ 
	public abstract Cursor loadInBackground();
 
	/** 
	 * Registers the content observer for the cursor.  
	 * @param cursor {@link Cursor} whose content is to be observed for changes 
	 */ 
	protected void registerContentObserver(Cursor cursor){
		cursor.registerContentObserver(mObserver);