title: Is it a good idea to bind on an Android service in the application class?
body: <p>I have an Android foreground service that contains a map of session (key, session). In my activities, I receive a key and I want to get the session from the service. So I bind each of my activities to the service and I can ask the service to get my session with my key. But doing this means that I have to wait for <code>onServiceConnected()</code> to get the session.</p>
  
  <p>Is it a good idea to bind the service once in my application class and put my service in a static variable, then all my activities can access the service directly in their <code>onCreate()</code> instead of waiting for the call of <code>onServiceConnected()</code>? But is it sure that my static variable will always be there? Do you know if Android can delete that static variable if it needs resources? I guess the application instance is never deleted, am I right? So it could be a good idea to keep my service in a static variable. What do you think?</p>