Why doesn't my iPhone 4 charge when it's on?

Ok, so when I turn my phone off, while plugged in, it will charge but I can't get on it. Every NOW AND THEN when it is on it may charge. Does anyone know how to fix this so I can keep it charging consistantly?

Get a new phone

Go to the Apple Store. We aren't there to see the problem.

When your charging u either have the wrong outlet plug or a differs brand cord try buying a charger from app and do not modify the charger also do not be using it while its charging that's how phone batteries fry

Try restarting the phone

The iPhone 4 tends to glitch rather often considering it is such an old model. There are not too many known fixes since Apple simply encourages their customers to buy the newest models.

Completely clear all open apps (calendar, Facebook and so forth). Shut it completely down by turning it off. Then restart (re-boot) it by plugging in the charging cable. Re-booting it clears the junk and allows it to charge as it should.

Weak battery. Batteries in iPhones don't last forever, especially with such an old phone like the iPhone 4. Take it to a local phone repair shop and have the battery replaced.

The battery is weak

  • Why doesn't my right headphone doesn't make sound? I have the iPhone 7 EarPods (not the Bluetooth ones ) They were working just fine until one day I realized that there was no sound coming out of the right side. I already cleaned it but doesn't work. How do I fix this?
  • Why doesn't my iphone4 charge? Ever sins I downloaded a battery saver app from the app store my phone hadn't charge I could leave it over night from 3% and when I wake up in the morning to see if it has charged it's only at 18%.It also turns off when I unplug it and when its in my pocket, I don't know if it turns off because the battery doesn't work anymore or if its because the back of my iPhone is cracked.
  • Why doesn't my iPhone fully charge? When my iPhone 4 runs out of battery it charges until around 10% and then it stops. Yesterday it fully charged and I don't know how it did. But the charger is fine because my iPod charges fine with it. So what's the solution? I don't want to throw the phone away and I don't want to take it into repair unless I really have to. So how can I get my iPhone to charge? It also won't connect to my PC.
  • Why doesn't my iPhone 6s doesn't have night shift? When I go into settings and then into brightness there's no option for it! My phone is completely updated The title was worded badly on my part but you know what I mean