private void startDelete(Task task) { pipe.remove( task.getId(), new Callback<Void>() { @Override public void onSuccess(Void data) { startRefresh(); } @Override public void onFailure(Exception e) { Toast.makeText( getActivity(), "Error removing task: " + e.getMessage(), Toast.LENGTH_LONG) .show(); } }); }