Try the following process:
- Uninstall the app.
- restart the phone.
- obtain the app from Google Play
- Install the app again
Update
Today, after turning my phone on (after uninstalling and installing Messages yesterday), Google Messages asked me for my phone number.
I'm assuming this is because I re-installed the app yesterday.
However, it did not show this message yesterday after restarting.
I remember seeing this message long ago when the problem started and I believe that time I chose Don't Ask Again. This time I'm leaving that option unselected to see if it helps solve the problem.
I added my number and clicked OK and it seemed to save the number to the app the same way as when I manually add it. Let's see if retains the data now??
Update 2
I turned my phone off and allowed it to restart.
I get the following message but only when I start Google Messages and then click a Group Message (MMS). I will see this little warning at the bottom of the group. It shows up as :
Messages needs your phone number - FIX
If you click the FIX message then it proceeds to the other screen where you can enter your number. If you don't click that message in about 3 seconds it disappears.
If I add the phone number and say don't ask again then it saves my number while the phone is on but doesn't save the data permanently.
If I add the phone number and allow it to ask again then it saves my number while the phone is on but still doesn't save the number permanently.
UPDATE 3
Device Displays Phone Number
My phone number shows up perfectly fine on my device under:
Settings => About phone => Status => My phone number
So, I figured I should test the Android API call and see if that works on my phone.
Retrieve Phone Number Via Android API
I added some code to retrieve my phone's number using the Android API.
I added the code to another program I had previously created and added the command to the menu and ran the code and it successfully retrieved my phone number.
If I Can Write That Code, Google Messages Devs Should Be Able To Also
I've blotted out my phone number but you can see the first two digits and that the app is able to retrieve the phone number so Google Messages should be able to do that automatically too.
Here's the basic code I used to do that:
// 1. use TelephonyManager API
TelephonyManager tMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
// 2. insure that the app has the correct permissions to allow it to read phone number
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_SMS) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_NUMBERS) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {
// 3. handle perms failure here.
}
// 4. get the phone number
String mPhoneNumber = tMgr.getLine1Number();
// 5. display the phone number in the main text control (outText)
outText.setText(mPhoneNumber);
Update 4
I added a few more API calls to get more information about my phone:
I figured maybe this only occurs on GSM devices or something (versus CDMA)??
I wanted to show that the SIM card is in a good state.
I was curious about the MMS agent that is being used.
NOTE: The "Device Software Version" is actually the telephony driver and not the Android API level. This phone is running Nougat API level 25.
Here are the extra calls I made to the API (they're all TelephonyManager calls):
tMgr.getMmsUserAgent()
tMgr.getDeviceSoftwareVersion()
tMgr.getPhoneType() // GSM, CDMA, SIP or NONE
tMgr.getSimState() // numerous states (see docs*)
*docs