It can be the charging block that is maybe lose r it can be the charger point that messing around go get new one and it must be a origendol one for samsung thèn if it stil doing the same thing then u take phone for fixing the charging block then
Just open ur phone then u go to the speaker there whil be a big one whit a smoll one attetsh to it just remof it for u to can clean it whit a earbut an the perpol sperets just dip the earbut in but it musent be to must wet then u go to ur speaker and...