Code example for AsyncTaskLoader

0
 
        List<ResourceRepository> resourceRepos;
         
 
        public ResourceRepoLoader(Context context) {
            super(context);
        } 
 
        /** 
         * 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<ResourceRepository> loadInBackground() {
			Log.d(this.getClass().getName(), "Load in Background");
 
            //resourceService.doSomething(); 
            return new CrossConnectServerService().getResourceRepos(); 
        } 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE