How to Add Contacts from Texts with Galaxy S 4
From the text screen, tap the telephone number at the top.
Because your phone does not recognize this number from your current contacts, it only shows you the digits from the phone that sent you the text. To add the contact to your database, move to Step 2.
Tap the telephone number to add this person to your contact database.
This brings up the pop-up shown.