As several have said ... sounds like a bad battery. I’ve had that issue before with phones and was always the problem.
I have a Samsung Galaxy Sii and I agree, it’s probably the battery. You can get them really cheaply off the ‘net, but stay heads up and get an OEM replacement and make sure it has the same mAh (milli Amp hours) capacity — my original was 1650 mAh and I mistakenly bought a 1500 mAh because it was a few bucks cheaper — you could really tell the difference. So I now keep the 1500 in reserve and bought a 1650, which is in the phone now. No problems.
you want to run an virus scan or go into the developer set up and change the background apps limit to 4 or 5, it defaults to unlimited. that will help save battery life, if the battery is not shot. If you can remove the battery try spinning it on a flat surface. the more it spins the worse the battery is, as it expands and becomes rounded in the middle. might not be perfect but its a rough indicator of a battery’s condition.
Probably the battery has reached the end of its useful life. See if it does the same thing when you are using the phone while plugged into the charger. If it works fine, then it’s probably the battery.
I dumped Sprint with six months left on my contract, went over to Straight Talk for about $50 a month including tax (unlimited talk/text/3.0 GB of LTE data), AT&T Towers, and bought a Nexus for $ 350 or so. Never looked back.
I may be upgrading to the OnePlus One next month. I’m not signing on to long term contracts anymore. I’ll but a nice phone around the $300 price point and go with Straight Talk month-to-month.
Straight talk has been great with far more reliable data than Sprint.
I had this problem with my Samsung. It turned out that the case I had on it was causing the phone to overheat. Once the protective cover was gone, no more problems.