So I just had an interesting experience myself with this. My initial phone charger died when one of the pins that go into the power socket came out. So I changed over to another charger that even I don't have a clue where I picked it up from. Initially this worked, but the longer I used it the less my Samsung Galaxy Active 4 liked to accept a charge from it. Eventually it stopped charging from it altogether.
I went out and bought an entirely new charger. Initially, this worked perfectly. But then gradually, the phone stopped taking a charge from the new one as well. Shortly after this I noticed (as did many others) it would take a charge from the PC. So for a few days I went with this method. Tonight however, I got pretty frustrated, and foolishly tried the suggestion on page two, "Let the phone run the battery completely flat and then try charging it."
After this, it didn't matter whether I plugged it into. Both mobile charger or the PC, the screen would light up for a bit with the Grey battery with a bolt in the middle (no charging green goodness oozing up like usual) then after 20 or so odd seconds, it would turn off the screen, buzz, repeat. Doing this over and over regardless of whether it was the PC or the charger.
This was when I looked at the USB cables as mentioned in a couple of posts here. Two of my cables were of the more snug fitting cables, while the other one (the initial one, which was now bent and admittedly worn down and weathered) was the cable with plenty of wiggleroom in the Micro USB charging slot of the phone.
Since the previous two posts mentioned the snugger cable having the success rate I was trying everywhere with both of those cables to no success. Every computer USB port, every charger, every wall socket. Just a grey non-charging battery with a buzz as the phone restarted itself with the ATTEMPT to charge. I tried using the looser, worse cable with the charger on the phone. Phone didn't even wake up or buzz. Just nothing. BUT LO AND BEHOLD... when I put the worse, loose cable into the PC with the phone. A charge.
I don't even know what to make of this at this point. But if anyone else gets to the same point I did. There you go. Maybe this will help you.
EDIT:
It's been a while and it's gotten much worse. Initially after I discovered it liked the ****tier USB cord more I was that to charge and it would take a few minutes of fiddling to get it in the "sweet spot."
Eventually however it just reached a point where it completely refused to charge. My phone has not been charging all day regardless of what I try. Screen lights up, vibrated once and turns off again. Doesn't even show the grey battery. I talked this over with my friend. Turns out the Sumsung galaxies 3 and 4 are well known for mainboard problems and this is one of them.
If you are reading this because you just discovered the problem, it's time to get that phone replaced asap before it bricks itself.