private void deleteFetchedCheckin() { fetchedAdapter = new ListFetchedCheckinAdapter(this); pendingAdapter = new ListPendingCheckinAdapter(this); final List<ListCheckinModel> items = fetchedAdapter.fetchedCheckins(); for (ListCheckinModel checkin : items) { new ListCheckinModel().deleteAllFetchedCheckin(checkin.getCheckinId()); } ImageManager.deleteImages(this); }
/** Background processing. */ @Override protected Bitmap doInBackground(Object... params) { data = params[0]; final String dataString = String.valueOf(data); Bitmap bitmap = null; // If the bitmap was not found in the cache and this task has not // been cancelled by // another thread and the ImageSwitcher that was originally bound to // this task is still // bound back to this task and our "exit early" flag is not set, // then call the main // process method (as implemented by a subclass) if (bitmap == null && !isCancelled()) { if ((fullScale) && (width == 0)) { bitmap = ImageManager.getBitmaps(context, dataString); } else { bitmap = ImageManager.getBitmaps(context, dataString, width); } } return bitmap; }
private void deletePendingCheckin(int checkinId) { // make sure it's an existing report AddCheckinModel model = new AddCheckinModel(); UploadPhotoAdapter pendingPhoto = new UploadPhotoAdapter(this); if (checkinId > 0) { if (model.deleteCheckin(checkinId)) { // delete images for (int i = 0; i < pendingPhoto.getCount(); i++) { ImageManager.deletePendingPhoto(this, "/" + pendingPhoto.getItem(i).getPhoto()); } // return to report listing page. } } }