This happened yesterday night first. My phone's battery was very slow, so I decided to charge it. It didn't start charging after plugging in the charger. Frustrated, I kept trying with different USB cables and laptop USB ports and wall adapters. I tried with my wife's phone too, and it started charging.
Eventually, the phone died, and I plugged it in anyway. After that, it started showing the battery symbol and the charging animation (as it always does when charging when switched off), but the animation would stop and the display would go off, and the entire symbol and charging animation would repeat. This would keep repeating.
I gave up, stopped charging it and when to sleep.
When I woke up in the morning, I decided to give it another shot, and it just started working! I had to go to work, so it could only charge to around 50% before I left. I tried charging in the office with the USB port, but it very slow, almost not charging at all, just keeping up with the discharge!
I just got back home a little while ago, and it's the same story as last night. It is refusing to charge, and there is 10% battery left!
A few days ago, I left my phone in my pocket when I was on the treadmill in the gym, and it was getting tossed around in the pocket a lot.. I don't know if this has anything to do with it.
Will replacing my battery help? Is there anything else I can do? Software reset?
Edit: It just started charging now. It was just kept switched on and plugged into my laptop, with airplane mode enabled (as battery is low, and I live in a bad area with poor reception). I didn't even try to reinsert the charger. Looks like I am going to sleep a little more peacefully tonight, but I am still concerned as to why this happens, and would like to fix it.