R
R
Rinat2020-06-20 12:44:35
Java
Rinat, 2020-06-20 12:44:35

Android, dagger is it possible to update inside a module?

Please help, a project with a socket was built using the dagger module

part of the connection code

@Module(includes = ContextModule.class)
public class SocketModule {
....
 try {
            mSocket = IO.socket(SOCKET_URL, opts);
        } catch (URISyntaxException e) {
            e.printStackTrace();
        }
....
}


the socket is working fine. but I need to somehow change the SOCKET_URL address using the button, apply and reconnect the socket.

is it possible to somehow change the default SOCKET_URL in the dagger and reconnect?
tell me how to implement socket address change. lack of experience with daguerre.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question