use of org.odk.collect.android.dao.FormsDao in project collect by opendatakit.
the class FormsDaoHelper method getFormLanguage.
public static String getFormLanguage(String formPath) {
String newLanguage = "";
try (Cursor c = new FormsDao().getFormsCursorForFormFilePath(formPath)) {
if (c.getCount() == 1) {
c.moveToFirst();
newLanguage = c.getString(c.getColumnIndex(FormsProviderAPI.FormsColumns.LANGUAGE));
}
}
return newLanguage;
}
use of org.odk.collect.android.dao.FormsDao in project collect by opendatakit.
the class FormsDaoHelper method getFormPath.
public static String getFormPath(String selection, String[] selectionArgs) {
FormsDao formsDao = new FormsDao();
String formPath = null;
try (Cursor c = formsDao.getFormsCursor(selection, selectionArgs)) {
if (c != null && c.getCount() > 0) {
c.moveToFirst();
formPath = c.getString(c.getColumnIndex(FormsProviderAPI.FormsColumns.FORM_FILE_PATH));
}
}
return formPath;
}
Aggregations