use of org.odk.collect.android.tasks.SavePointTask in project collect by opendatakit.
the class FormEntryActivity method nonblockingCreateSavePointData.
/**
* Creates save-points asynchronously in order to not affect swiping performance on larger forms.
* If moving backwards through a form is disabled, also saves the index of the form element that
* was last shown to the user so that no matter how the app exits and relaunches, the user can't
* see previous questions.
*/
private void nonblockingCreateSavePointData() {
try {
SavePointTask savePointTask = new SavePointTask(this);
savePointTask.execute();
if (!allowMovingBackwards) {
FormController formController = getFormController();
if (formController != null) {
new SaveFormIndexTask(this, formController.getFormIndex()).execute();
}
}
} catch (Exception e) {
Timber.e("Could not schedule SavePointTask. Perhaps a lot of swiping is taking place?");
}
}
Aggregations