Active Member
Licensed User
Longtime User
Hi, I have an App.. that is a service (TCP Connection)..

My service still working all time... in some celphones (newest),.. The TCP Connection is broken after some minutes...

"Failed to connect: (SocketTimeoutException) connect timed out"

The server is working good, others celphones are connected (all works good.. but for some reason the newest phones lost the connection).

I think that the phone is blocking the connection.. maybe for a battery optimization..

How can I do for the cellphone ignore my app from battery optimization?

I tried this:

But give me some errors..

Can anyone help?