title: Is there a way to use injectors in a non-(Activity,Service,Fragment, Application) class
body: <p>We're using Dagger2 in our application.  I am trying to do a room database and I am writing the repository code, but I would like to inject application context and the DAO for the class.  </p>
  
  <p>I have a feeling that you can only do Dagger injection in Fragments, Activities, Services, Applications, etc.  </p>
  
  <p>Here's what I have: </p>
  
  <pre><code>class DownloadsDataRepositoryImpl : IDownloadsDataRepository, HasAndroidInjector {
  
        @Inject
        lateinit var androidInjector : DispatchingAndroidInjector&lt;Any&gt;
  
        @Inject
        lateinit var downloadsDao: DownloadsDao
  
        override fun androidInjector(): AndroidInjector&lt;Any&gt; = androidInjector
        init { 
           androidInjector()
        }
  
  }
  </code></pre>
  
  <p>But I'm sure it's not going to work.  Is there a way to do it?</p>