Skip to content
This repository has been archived by the owner on Jan 12, 2019. It is now read-only.

RTL support fails on some versions of Android #207

Open
pieczatek opened this issue Sep 11, 2017 · 0 comments
Open

RTL support fails on some versions of Android #207

pieczatek opened this issue Sep 11, 2017 · 0 comments

Comments

@pieczatek
Copy link

General information

SDK/Library version: 5.5.1
Testing environments:

  1. Nexus 5X Emulator / Android 4.4.2 (API 19 KitKat)
  2. Galaxy Ace Style LTE / Android 4.4.4 (API 19 KitKat)
  3. Nexus 5X Emulator / Android 6.0 (API 23 Marshmallow)
  4. Nexus 5X Emulator / Android 8.0 (API 26 Oreo)

All set to RTL Layout in OS Settings (With or without Hebrew language which is written right to left)

My code: https://github.com/pieczatek/CardIOExample/blob/master/app/src/main/java/com/bi/cardioexample/MainActivity.java

Issue description

I'm launching CardIOActivity for card scanning. Then I skip scanning and go straight to manual typing. Let's say I'm going to type 378282246310005 (American Express). When correct it should display 3782 822463 10005, so whitespace separating blocks of digits does not cause any trouble. Unfortunately in some cases I get reverse words on my input field

type 3 -> displays 3
7 -> 37
8 -> 378
2 -> 3782
8 -> 8 3782
2 -> 82 3782
2 -> 822 3782
4 -> 8224 3782
6 -> 82246 3782
3 -> 822463 3782
1 -> 1 822463 3782
0 -> 10 822463 3782
0 -> 100 822463 3782
0 -> 1000 822463 3782
5 -> 10005 822463 3782

After I click "done" I get the result with resultDisplayStr = "Card Number: " + scanResult.getFormattedCardNumber() + "\n"; and it is correct: Card Number: 3782 822463 10005

The weirdest thing is when I get the result without any string modification, that is resultDisplayStr = scanResult.getFormattedCardNumber();, I get reversed words again: 10005 822463 3782

I run the same code on 4 different testing environments specified above. Works fine on Android 4.4.4 and 8.0, fails on Android 4.4.2 and 6.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant