At some mobiles it works perfectly but it seems that especially newer ones do not want to connect to the server. I have one Samsung Galaxy S8 that when I use the app will not connect to the server but with the same mobile I can browse to the game and in the browser it does work. I have not all the phones in the world and find it very puzzling why on some devices it will not connect.
I already tried to use websockets as connection method but to no avail. Is there a permission request that should be done which I can not find? Anyone else recognizes this problem? Any help as usual is greatly appreciated.
The server is a mosquito server on port 9001. Using websockets the initial request I believe is HTTP. Are apps nowadays not allowed to make HTTP requests by default?
Anyway I doubt that there is HTTP involved because the MQTT protocol is standing on its own over TCP/IP
It might be that you use websockets instead of secure websockets. Mosquito supports secure websockets. You can try to get a certificate from https://letsencrypt.org/ and use it for the mosquito server and then checking that solves the problem.
I was not reading carefully enough what steliosm had answered so it took a while before it resonated in this hard head of mine. But thanks to his help in PM i have figured it out. The problem is indeed solved. Now that everything is SSL encrypted the Samsung S8 will also connect with the app.
For anyone ever searching for this problem. I used certbot from the above site to install the certificates on my server. I made the certificates myself first with openssl and that does not work because the browser rejects them.
great many thanks seliosm for your help. The case can be closed!