title: Roboguice /getInstance + best practice
body: <p>I just started using Roboguice (+Guice) and I am not sure about the best practice how to use it.</p>
  
  <p>In my Activity I have about 5 functions (out of about 30) which uses an object called "ProviderQueries" (Singleton). I could use it in two ways:</p>
  
  <p>1.)</p>
  
  <pre><code>    protected void onResume() {
         super.onResume();
         getInjector().getInstance(ProviderQueries.class).setLanguage("EN");
  }
  </code></pre>
  
  <p>2.)</p>
  
  <pre><code>class MyActivity extends RoboActivity {
      @Inject
      private ProviderQueries pv;
  
      ...
  
         protected void onResume() {
            super.onResume();
            pv.setLanguage("EN");
            }        
   }
  </code></pre>
  
  <p>1 - too long but the instance of ProviderQueries is used where it is needed<br> 
  2 - short and nice but "pv" is available for the whole Activity but only needed in 5 different function...</p>
  
  <p>Which approach would you use, or do you have a better solution?</p>
  
  <p>Thanks in advance!</p>