In the past few days my phone has been very slow to charge. Today I went to charge it while it was dead, and a question mark appeared on the battery icon. The phone kept turning on and off so I took it off the charger and turned it on myself. I then put the phone on the charger, and a red and green light started flashing: red, green, pause... red, green, pause... and then it cuts off, but the phone still won't charge.
What could be the problem?