The connector was not functioning correctly anymore. You needed to flex the connected cable to keep the phone charging. Probably the 5 Volt connection was broken or misaligned. I watched toe following movie on Utube which clearly describes what to do to fix the device.
Double sided mobile phone tape Plastic opening tool/plectrum/ PH00 screwdriver Spudger/screwdriver Hair dryer Samsung Galaxy S Advance I9070 Charging Port Flex Cable Ribbon – ETrade Supply VIDEO
The steps taken were:
Shutdown the device Removed the battery (of course after removing the battery cover) Remove SIM and uSD card Remove the 6 screws on the back with a small Philips screwdriver (are the same size) Remove outside/rear housing, unlock the clips with your fingernail or plastic opening tool. Start at the bottom. When replacing the back cover make sure to exchange the antenna which is clicked in there. Disconnect and remove the loudspeaker Disconnect the 3G GSM antenna cable Lift the volume switch (use the hair dryer to soften the adhesive) Lift the power switch Disconnect the LCD flex cable Disconnect the front camera Remove the 7th screw on the top side Disconnect the USB cable The main board can be removed now The SIM and uSD board can be removed from the main board now (only if needed, make sure the clip and pins are aligned when replacing it with a new one) Also the camera can be replaced from the main board now (only if needed) Now for the removal of the USB flex assembly Lift the vinyl tape (carefully) Lift the flex cable (slowly) When removing the bottom part of the USB flex assembly, watch out bcos it is connected to the capacitive sensors of the menu and back buttons Remove the silicone gasket from the microphone