Texting doesn't work

When I use texting, to detect msg and send them it doesn't work. It doesn't even detect that I got the msg, but I don't know if it can send one yet, as it doesn't even detect it. (Btw I use huawei p30)
Problematic part:
Whole code: