Code example for AsyncTaskLoader

0
        List<OnlineAudioResource> onlineResources;
         
        BibleText loadBibleText;
         
        public ResourceLoader(Context context, BibleText bibleTxt) {
            super(context);
            loadBibleText = bibleTxt;
        } 
 
        /** 
         * This is where the bulk of our work is done.  This function is 
         * called in a background thread and should generate a new set of 
         * data to be published by the loader. 
         */ 
        @Override public List<OnlineAudioResource> loadInBackground() {
			Log.d("ResourceLoader", "Load Resources from Server in Background");
 
            //resourceService.doSomething(); 
            return new CrossConnectServerService().getOnlineResource(loadBibleText.getBook());
        } 
Connect your IDE to all the code out there  Get Codota for Java