I have set up DI with HILT in my project . Now I have to integrate FCM Push notifications so I have to provide repository instance to Firebase messaging service class to update the new fcm token to server(perform an api call from the service class) when a new token is invoked. How can i do this and what would the best practice?

AppModule

```html
@Module
@InstallIn(ApplicationComponent::class)
class ApplicationModule {

    @Provides
    @Singleton
    fun provideServiceTokenAuthenticator(sharedPreferences: SharedPreferences,
        @ApplicationContext appContext: Context,chatManager: ChatManager): ServiceTokenAuthenticator =
        ServiceTokenAuthenticator(sharedPreferences, appContext,chatManager)

    @Provides
    @Singleton
    fun provideApiService(okHttpClient: OkHttpClient): ApiService {
        return Retrofit.Builder().baseUrl(BuildConfig.BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .addCallAdapterFactory(RxJava3CallAdapterFactory.create()).client(okHttpClient).build()
            .create(ApiService::class.java)
    }

    @Provides
    @Singleton
    fun provideOkHttpClient(serviceTokenAuthenticator: ServiceTokenAuthenticator,sharedPreferences: SharedPreferences): OkHttpClient {
        val loggingInterceptor = HttpLoggingInterceptor()
        loggingInterceptor.level = HttpLoggingInterceptor.Level.HEADERS
        loggingInterceptor.level = if (BuildConfig.DEBUG) HttpLoggingInterceptor.Level.BODY else HttpLoggingInterceptor.Level.NONE

        return OkHttpClient.Builder().connectTimeout(2, TimeUnit.MINUTES)
            .readTimeout(2, TimeUnit.MINUTES).writeTimeout(2, TimeUnit.MINUTES)
            .addInterceptor(object : Interceptor {
                override fun intercept(chain: Interceptor.Chain): Response {
                    val ongoing = chain.request().newBuilder()
                    sharedPreferences.appLanguage?.let {ongoing.addHeader("Accept-Language", it)  }
                    return chain.proceed(ongoing.build())
                }
            })
            .retryOnConnectionFailure(true).authenticator(serviceTokenAuthenticator)
            .addNetworkInterceptor(StethoInterceptor()).addInterceptor(loggingInterceptor)
            .build()
    }

    @Provides
    @Singleton
    fun provideRepository(apiService: ApiService, sharedPreferences: SharedPreferences,
        chatManager: ChatManager,localeHelper: LocaleHelper): Repository =
        Repository(apiService, sharedPreferences, chatManager,localeHelper)

    @Provides
    fun provideChatManager(@ApplicationContext appContext: Context): ChatManager {
        return ChatManager(appContext)
    }

    @Provides
    @Singleton
    fun provideLocaleHelper(@ApplicationContext appContext: Context): LocaleHelper {
        return LocaleHelper(appContext)
    }

}
```

in this you can see

```html
 @Provides
    @Singleton
    fun provideRepository(apiService: ApiService, sharedPreferences: SharedPreferences,
        chatManager: ChatManager,localeHelper: LocaleHelper): Repository =
        Repository(apiService, sharedPreferences, chatManager,localeHelper)
```

I need to provide the repository to FCM Listener service class

```html
class FcmListener: FirebaseMessagingService() {
    override fun onNewToken(token: String) {
        super.onNewToken(token)
        Timber.e("Fcm Token $token")
        //how to get repository instance here to make api call?
    }

    override fun onMessageReceived(remoteMessage: RemoteMessage) {
        super.onMessageReceived(remoteMessage)
        Timber.e("Fcm message data ${remoteMessage.data}")
        Timber.e("Fcm message  ${remoteMessage.notification}")
        Notifier.showNotification(remoteMessage,applicationContext)

    }
}
```

Please note i have set up everything with hilt alone and not dagger.
These are dependancies used

```html
 // Hilt
    implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha02"
    implementation 'com.google.dagger:hilt-android:2.28-alpha'
    kapt 'androidx.hilt:hilt-compiler:1.0.0-alpha02'
    kapt 'com.google.dagger:hilt-android-compiler:2.28-alpha'
```

Please help to achieve this flow.Your help is very much appreciated