public void saveNewEventAsynk(final Event event) { new AsyncTask<Params, String, Result>() { @Override protected Result doInBackground(Params... params) { String eventId = UUID.randomUUID().toString(); saveEvent(eventId, event.getName(), event.getDate(), event.getCategoryId(), event.getRepeat(), event.getType()); return null; } }.execute(); }