Code example for AsyncTaskLoader

	 * A custom Loader that loads all of the camera images for this mountain pass. 
	public static class CameraImagesLoader extends AsyncTaskLoader<ArrayList<CameraItem>> {
		public CameraImagesLoader(Context context) {
		public ArrayList<CameraItem> loadInBackground() {
			bitmapImages  = new ArrayList<CameraItem>();
	        JSONArray cameras;
	        CameraItem c = null;
	        try { 
				cameras = new JSONArray(camerasArray);
				int numCameras = cameras.length();
				for (int k=0; k < numCameras; k++) {
					JSONObject camera = cameras.getJSONObject(k);
					c = new CameraItem();
Experience pair programming with AI  Get Codota for Java