use of org.odk.collect.settings.keys.ProjectKeys.KEY_PROTOCOL in project collect by opendatakit.
the class ServerPreferencesFragment method runGoogleAccountValidation.
private void runGoogleAccountValidation() {
String account = settingsProvider.getUnprotectedSettings().getString(KEY_SELECTED_GOOGLE_ACCOUNT);
String protocol = settingsProvider.getUnprotectedSettings().getString(KEY_PROTOCOL);
if (TextUtils.isEmpty(account) && protocol.equals(ProjectKeys.PROTOCOL_GOOGLE_SHEETS)) {
AlertDialog alertDialog = new MaterialAlertDialogBuilder(getActivity()).setTitle(R.string.missing_google_account_dialog_title).setMessage(R.string.missing_google_account_dialog_desc).setPositiveButton(getString(R.string.ok), (dialog, which) -> dialog.dismiss()).create();
showDialog(alertDialog, getActivity());
} else {
continueOnBackPressed();
}
}
Aggregations