title: Is there a way to inject an object into an interface using Dagger2
body: <p>In my activity class, I can inject a ViewModel using:</p>
  
  <pre><code>@Inject
  GameViewModel gameViewModel;
  </code></pre>
  
  <p>And it works fine. The problem is, that I want to use the object in an interface:</p>
  
  <pre><code>public interface SharedData {
      @Inject
      GameViewModel gameViewModel;
  
      default void createNewUser(User authenticatedUser) {
          gameViewModel.userLiveData.observe(this, user -&gt; {
              Log.d("TAG", user.name);
          });
      }
  }
  </code></pre>
  
  <p>Is this even possible? Because I get:</p>
  
  <blockquote>
    <p>Variable gameViewModel might not have been initialized </p>
  </blockquote>
  
  <p>Isn't Dagger supposed to do that?</p>