APK does not work on newer mobiles (Samsung Galaxy S8)

I compiled my multiplayer game (using MQTT server/client) at http://www.semaggames.nl/ElementsOnlineWeb/ to be an apk and made it available in the google playstore for download at https://play.google.com/store/apps/details?id=elements.online.v040 .

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 app has all access granted in the settings.

Is the server HTTP or HTTps?

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

HTTP. Are apps nowadays not allowed to make HTTP requests by default?

No in new Android system

I hard the game problem Json and Dreamlo and Android - #31 by Salvatore

I will have a look into that. I wonder how it relates though to connecting to an MQTT server exactly but I will research some more.

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.

Yes I am reading into it and trying to configure the server. Indeed that is perhaps a solution. Thanks for all the help

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!