-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix error scenario if user enters lowercase letters in passport number #63
fix error scenario if user enters lowercase letters in passport number #63
Conversation
@@ -121,7 +121,7 @@ abstract class MainActivity : AppCompatActivity() { | |||
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {} | |||
override fun afterTextChanged(s: Editable) { | |||
PreferenceManager.getDefaultSharedPreferences(this@MainActivity) | |||
.edit().putString(KEY_PASSPORT_NUMBER, s.toString()).apply() | |||
.edit().putString(KEY_PASSPORT_NUMBER, s.toString().uppercase()).apply() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we want to do this, we should probably do it in the UI level, so people can see what is being entered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've pushed a new change now when you get a chance.
08fc8ca
to
d6841ae
Compare
@@ -73,6 +73,7 @@ import java.text.ParseException | |||
import java.text.SimpleDateFormat | |||
import java.util.* | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we revert this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, have done so now @tananaev
@@ -57,6 +57,7 @@ | |||
android:id="@+id/input_passport_number" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:inputType="textCapCharacters" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
d6841ae
to
1865ebf
Compare
Hi Anton, I found I was getting an error
org.jmrtd.CardServiceProtocolException: BAC failed in MUTUAL AUTH (SW = 0x6700: WRONG LENGTH) (step: 2)
if I entered my passport aspa1234567
instead ofPA1234567
, so thought you might consider this quick fix for it.Regards,
Glenn