When my first Activity loads i create a service (Socket connection to my server), and this srrvice suppose to keep running while the app is running.
I navigate to other Activities, and I need to somehow get an instant of this Service class to call a method "sendDataToServer".
How can I access a service from my Activity, or any class?
I navigate to other Activities, and I need to somehow get an instant of this Service class to call a method "sendDataToServer".
How can I access a service from my Activity, or any class?