Answer the question
In order to leave comments, you need to log in
What is the best way to store sockets in an Android application?
Tell me how best to store socket variables in an android application? I need to access them from different places in the application. They can only be initialized from a background thread.
Answer the question
In order to leave comments, you need to log in
Make some kind of abstraction "socket manager" or something like that. Store depending on the lifetime, for example, in an activity scope.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question