java - Android Background Sockets -


Therefore, I am creating an app, and I need a continuous background thread. It should not be closed, the socket is always open, so please tell me to send and close the data, because I have sent an authorized request every time, and sometimes the app receives the data from the server. So, will AsyncTask be OK to use?

AsyncTask is used for small, fast background work and not long-term background work for it You should use the service or at least thread.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

How to access user directory in lazarus? -

java - Gradle dependencies: compile project by relative path -