Websocket is not working on android phone

The websocket is working on web but not working on android.
I have tested my code on web and it is working. But when I packed my code into an .apk file and instlled on my phone the websocket seize to work.

I also encountered the same problem, Websocket ErrorCode: 1006, Have you solved it yet?

look: IonicFramework v8 cannot use WebSocket correctly in Android. Error code 1006, but it runs normally in Chrome

If WebSocket is not working on an Android phone, check for network issues, firewall restrictions, or outdated browser/app versions. Also, ensure your server uses secure wss:// for HTTPS compatibility. Some mobile networks may block WebSocket ports.