Когда я пытаюсь запустить тестирование инструментария, расширенный класс FirebaseMessagingService запускается сам, поэтому тест завершается, так как область не готова.Я инициализирую область в своем классе Application.
Есть ли способ остановить сам запуск класса Firebase при тестировании?
Сообщение об ошибке:
java.lang.RuntimeException: Unable to create service .gcm. FirebaseMessagingService:
java.lang.IllegalStateException: Call `Realm.init(Context)` before creating a RealmConfiguration
AndroidManifest.xml:
<service android:name=".gcm.FirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
Единственное место, где это называется, - инъекция Dagger2 в расширенный класс.
private val component: FcmServiceComponent by lazy {
GetApplicationComponent.execute(this).fcmServiceComponent()
}