private String getKeyType() throws ViewNotFoundException { RadioButton rsaButton = findView(RadioButton.class, R.id.pk_type_rsa); if (rsaButton.isChecked()) { return "RSA"; } return "DSA"; }