T
T
Tsuzukeru2021-01-20 16:42:23
Android
Tsuzukeru, 2021-01-20 16:42:23

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

1 answer(s)
D
Denis Zagaevsky, 2021-01-22
@Tsuzukeru

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 question

Ask a Question

731 491 924 answers to any question