Code example for AsyncTaskLoader

0
    // 
    // Loader 
    // 
    private final static class AgenciesLoader extends AsyncTaskLoader<ObaAgenciesWithCoverageResponse> {
        AgenciesLoader(Context context) {
            super(context);
        } 
 
        @Override 
        public void onStartLoading() { 
            forceLoad();
        } 
 
        @Override 
        public ObaAgenciesWithCoverageResponse loadInBackground() { 
            return ObaAgenciesWithCoverageRequest.newRequest(getContext()).call();
        } 
    } 
 
    //