@Override protected void onCancelled() { toggleMenu(SYNC_ALL); RapidFtrApplication.getApplicationInstance() .cancelNotification(recordSyncService.getNotificationId()); RapidFtrApplication.getApplicationInstance().setSyncTask(null); }
@Override protected void onProgressUpdate(String... values) { RapidFtrApplication.getApplicationInstance() .showNotification( recordSyncService.getNotificationId(), recordSyncService.getNotificationTitle(), values[0]); }
protected void setProgressAndNotify(String statusText, int progress) { if (!isCancelled()) { RapidFtrApplication.getApplicationInstance() .showProgressNotification( recordSyncService.getNotificationId(), context.getString(R.string.sync_title), statusText, maxProgress, progress, false); } }
@Override protected void onPostExecute(Boolean result) { toggleMenu(SYNC_ALL); RapidFtrApplication.getApplicationInstance().setSyncTask(null); if (result) { RapidFtrApplication.getApplicationInstance() .showNotification( recordSyncService.getNotificationId(), recordSyncService.getNotificationTitle(), successMessage); Toast.makeText( RapidFtrApplication_.getApplicationInstance(), successMessage, Toast.LENGTH_LONG) .show(); } else { Toast.makeText( RapidFtrApplication_.getApplicationInstance(), RapidFtrApplication_.getApplicationInstance().getString(R.string.sync_error), Toast.LENGTH_LONG) .show(); } }