Code example for AsyncTaskLoader

Methods: onStartLoading

0
        this.mbid = mbid;
    } 
 
    @Override 
    protected void onStartLoading() { 
        super.onStartLoading(); 
        forceLoad();
    } 
 
    @Override 
    public AsyncResult<List<ReleaseInfo>> loadInBackground() {
        try { 
            return new AsyncResult<List<ReleaseInfo>>(LoaderStatus.SUCCESS, client.browseReleases(mbid));
        } catch (IOException e) {
            return new AsyncResult<List<ReleaseInfo>>(LoaderStatus.EXCEPTION, e);
        } 
    } 
 
} 
Experience pair programming with AI  Get Codota for Java