Cody Engel
10/03/2019, 5:31 PMFirebaseMessagingService
? I’m getting the following crash: java.lang.IllegalStateException: KoinApplication has not been started
class PushNotificationService : FirebaseMessagingService(), KoinComponent {
val telemetry: Telemetry by inject()
override fun onCreate() {
super.onCreate()
DependencyInjector.start(applicationContext)
recordFunction("onCreate")
}
This is what the start function looks like:
fun start(context: Context) {
startKoin {
androidContext(context)
modules(
listOf(
apiModule,
databaseModule,
pushModule,
repositoryModule,
repositoryRetrievalModule,
rxModule
)
)
}
}