i just had this problem. i am not an expert, but it was an easy fix! You just have to get some cotton buds and some isopropil alcohol or rubbing alcohol it works with both and first clean the headphone jack to remove water or debree, then you get another cotton bud and dip it in isopropil alcohol (rubbing alcohol) and clean it on the inside of the jack. just be careful if you damage anything, not my fault! the isopropil alcohol vaporizes quickly and wont damage anything with corrosion and it will clean the copper pads, but won't ruin them. i know that the phone is waterproof, but water got in between the two pads in the headphone jack and did a short which caused the phone to think that there are headphones plugged in, and the software automaticly turned off your speaker. You can recognise that since when you try to turn up the volume on the phone to a certain point it says that the sound can damage your hearing, which it wont say if you don't have headphones plugged in. its not a software thing its all in that stupid little jack. BTW i recently noticed that the charging port has a water censor, which is pretty cool if you ask me! even iphone doesn't have that feature (i think) and its a phone from 2017. the problem occured when i dropped my phone in water. its not a big deal! restarting the phone helps for like 5 seconds until the phone recognises that thereis a short (are headphones plugged in). sorry if there are some gramatic mistakes im still in 7th grade.