I recently tried to use a Loader to do background task in my app, but I've stumbled upon a problem as I implemented it. There is a conversion problem in the override of the onCreateLoader method (here is the code):
@Override
public Loader<ArrayList<Earthquake>> onCreateLoader(int i, Bundle bundle) {
return new EarthquakeLoader(this);
}
The return line is all red in my IDE because it expects an android.content.Loader object but this returns an object of type MyPackageName.ActivityName.EarthquakeLoader