I bought a Samsung Galaxy S7 Active through AT&T and switched over to T-mobile. I unlocked my phone and everything worked for about a month. All of a sudden my phone stopped connecting to internet off Wi-Fi. My phone still made calls and sent and received texts, but the data wouldn't work. I made sure my data was turned on and tried restarting my phone, and even did a factory reset. Still didn't fix the issue. I called T-Mobile for help and they reset my APN info back to their default, but it still didn't work. They ended the call by basically sorry we can't help, sometimes phones from other carriers default back to the original carrier and there's nothing we can do to fix it. THIS IS COMPLETELY WRONG. Here is the solution.
1. Go to Settings>Connections>Mobile Networks>Access Point Names
2. Click on each name and in the top right corn click the 3 dot menu icon and click Delete APN. Delete ALL of them.
3. Restart your phone.
4. Repeat step 1 and go back to Access Point Names.
5. Click ADD on the top right and fill in the APN information exactly like this: Network, APN, and VoLTE: Samsung Galaxy S7
6. Click the 3 dot menu icon in the top right corner and hit SAVE.
7. Go back to Access Point Names and make sure your new APN is selected.
8. Restart phone and Voila! Your data connection should work again!
You're Welcome.