I am facing an extremely strange issue with regards to charging the phone. I first encountered this a few months ago, but then it stopped. But now it has become a problem.
The phone does not charge while it is ON. I turn off the phone and plug in the charger, it then starts to charge. Then I turn on the phone and it continues to charge. But if I remove the charger and put it back it does not charge. So every time I have to charge the phone I have to turn off the phone and repeat this procedure.
I am thinking that it is a software issue but I can't be sure. I discovered this method because about 5 days ago I left my phone to charge for about an hour and when I looked at it, it didn't charge. Then I realised the problem and turned off the phone. Next day coincidentally I plugged the charger just to look and it started charging. I tested this procedure a couple of times and understood how it is working.
Any solution will be very helpful. Should I do factory reset?