• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to easily copy alpha-numeric PIN code

Hi guys,

Context: I am working on an app that sends the user a PIN code to check the phone number ownership. Due to company security restrictions, the PIN code has 6 characters, made from letters and digits (ex: AB12C3).

Question 1: How to easily copy the alpha-numeric 2FA code from the default SMS app? I did find a lot of articles about copying numeric codes, such as 12345, but I want an easy solution (no 3rd party apps) that can allow me to easily cop ya PIN code such as AB12C3.I only want to press on the code for a second to have it saved to the clipboard. I do not want to go through "Select text" -> manually select the PIN code. Is there a solution for this?

Thank you!
 
I think it may be in how you format the text message. When I get text messages for two step authentication the messenger app asks if I want to copy the code to the clipboard automatically.
upload_2019-6-27_7-15-34.png


BTW, I moved this to the dev area for better exposure.:)
 
Hi guys,

Context: I am working on an app that sends the user a PIN code to check the phone number ownership. Due to company security restrictions, the PIN code has 6 characters, made from letters and digits (ex: AB12C3).

Question 1: How to easily copy the alpha-numeric 2FA code from the default SMS app? I did find a lot of articles about copying numeric codes, such as 12345, but I want an easy solution (no 3rd party apps) that can allow me to easily cop ya PIN code such as AB12C3.I only want to press on the code for a second to have it saved to the clipboard. I do not want to go through "Select text" -> manually select the PIN code. Is there a solution for this?

Thank you!

I'm not a dev of course, but it might all depend on the particular default SMS app a phone comes with. Like the default SMS app on my Huawei recognises verification codes sent by my bank etc, and even has a one touch COPY CODE button for them. Like this...
Screenshot_20190627_192450.jpg


Note the message about "Malicious third-party apps have been prevented....", that could be all third-party apps actually, depending on the user settings.

My Samsung doesn't recognise these messages as verification codes, so needs to manually select, to copy and paste
 
I think it may be in how you format the text message. When I get text messages for two step authentication the messenger app asks if I want to copy the code to the clipboard automatically.
View attachment 142727

BTW, I moved this to the dev area for better exposure.:)

Thank you for your reply! In your example, the code only uses digits, which works fine for my case as well. But in my case the verification code has both digits and letters such as AB12C3. Because of this, I cannot easily copy the verification code.

If someone sends you a message like "Here is your verification code for Appus Maximus: AB12C3", would your phone be able to easily copy it?
 
I'm not a dev of course, but it might all depend on the particular default SMS app a phone comes with. Like the default SMS app on my Huawei recognises verification codes sent by my bank etc, and even has a one touch COPY CODE button for them. Like this...
View attachment 142729

Note the message about "Malicious third-party apps have been prevented....", that could be all third-party apps actually, depending on the user settings.

My Samsung doesn't recognise these messages as verification codes, so needs to manually select, to copy and paste

Thank you for your reply!

In your example, the code only uses digits, which works fine in my case as well. But in my case the verification code has both digits and letters such as AB12C3. Because of this, I cannot easily copy the verification code.

If someone sends you a message like "Here is your verification code for Appus Maximus: AB12C3", would your phone be able to easily copy it?
 
Thank you for your reply!

In your example, the code only uses digits, which works fine in my case as well. But in my case the verification code has both digits and letters such as AB12C3. Because of this, I cannot easily copy the verification code.

If someone sends you a message like "Here is your verification code for Appus Maximus: AB12C3", would your phone be able to easily copy it?

My phone's messaging app wouldn't actually recognise say AB12C3 as a code. But can hold down on it, which highlights it, and then it gives a COPY option, as well as SELECT ALL etc. I'm sure all SMS apps have select text, copy, and paste as their basic functionality.

Any particular reason why you need to use alphanumeric, as opposed to purely numeric codes. This is one time use codes isn't it like for multi-fsctor logins, payment verification, etc.? That are usually numeric only, and can be entered on a numeric keypad if necessary, as opposed to full QWERTY keyboards, that require shifting for numbers sometimes.

My bank sends numeric verification codes to make payments online, and these codes must be used within 60 seconds. I take too long, I have to request another code.
 
Last edited:
Back
Top Bottom