Nexus 5 charging problem
It just sounds like the plug is a little loose in the socket. This can often happen with cheaper USB cables. Just try a different USB cable and you'll probably get a snugger fit.

It's entirely normal that the phone charges more quickly when you're not using it. When you're using it, you're draining the battery at the same time as trying to charge it. It's like trying to fill a bath while the plug's out.


  If somebody know what I can do, I would be very thankful


You don't need to do anything. Your phone is working correctly.