I\'m trying to implement the transfer of a one-time code from SMS to the field above the keyboard, as in the image.
But for some reason the field above the keyb
Okay. This is what I could find out. Regarding the code, it is enough that I described above. Additional settings on the client is not required. But you need to pay attention to the text of the SMS message. As an example, I attached two messages.
In the first message, our code is defined by the system as a phone number. We can even call it if we click on it. But why do we need to call a one-time code? :)
In the second image, the code is defined as one-time, just what we need. If we click on it, the system will offer to copy it to the clipboard.
What is the difference? Unfortunately, it is not completely clear by what rule the text is parsed in SMS. But we can check your text in the following way:
If you set a property textContentType
to your text field and nothing works for you, the first thing you need to check is whether the operating system determines the code correctly. To do this, simply go to the message application and check the code:
At the end, in the first case, you should check the text of the message for the contents of incorrect characters.
PS Just a couple of examples of correct and incorrect SMS:
I got caught out by the fact "Autofill PAsswords" was turned off on the phone. It seems that it needs to be on for this functionaility to work.