Received my first support case on my app last week. A user from Russia couldn’t create an expense. To me a bit surprising, since it has been used for a couple of years and no one else have had this issue (to my knowledge). I asked him to write down step by step what he did. When I tried the same procedure, I couldn’t re-produce the problem. It worked very well on my mobile. He mailed me a video showing exactly what he did to make the app crash. This was video was extremely helpful and I immediately suspected what the problem could be. The format of number wasn’t consistent; it was displayed with a comma as decimal separator but he entered it with a dot as decimal separator.
In the page where the problem occurs, I use TextBoxes for numeric fields. A nice feature of TextBox is that you can set the type of input with a parameter called InputScope. This property determines which keyboard layout will be used when the user enters a value. I use Number which let the user to enter values with a numeric keypad.
When have tested my app I have always had a keypad with the right sign of the decimal separator. I have tested the app in a couple of different languages but never had a keypad with wrong decimal separator (unfortunately).
My first question was how do I select which decimal separator sign should be on the keypad? I couldn’t find any API so currently I don’t know how to do it from the code (if anyone knows, please leave a comment). I found out two other ways:
- Change keyboard in phone settings.
By selecting a keyboard for a language that uses another decimal separator I managed to change it.
- Long tap on the decimal separator.
If you long tap the decimal sign, you get a box where you can select which sign to use. You can also select the minus sign if you want to enter a negative number.
The work around for my user was to long tap and select the right decimal separator. While testing this, I realized that many of my users might very well have a keypad with the wrong decimal separator as default. I also found it a bit awkward to enter a decimal separator with long tapping, so in my next version I will simply this.