1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2024-11-23 22:56:23 -06:00

Fix firebase crashlytics (#202)

This commit is contained in:
Mikołaj Pich 2018-12-18 16:12:15 +01:00 committed by Rafał Borcz
parent 30388fffd7
commit 24e4870baf
5 changed files with 12 additions and 5 deletions

View File

@ -29,7 +29,10 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
playAccountConfig = playAccountConfigs.defaultAccountConfig
manifestPlaceholders = [crashlytics_enabled: project.hasProperty("enableCrashlytics")]
manifestPlaceholders = [
fabric_api_key: System.getenv("FABRIC_API_KEY") ?: "null",
crashlytics_enabled: project.hasProperty("enableCrashlytics")
]
}
signingConfigs {

View File

@ -62,6 +62,9 @@
android:resource="@xml/provider_widget_timetable" />
</receiver>
<meta-data
android:name="io.fabric.ApiKey"
android:value="${fabric_api_key}" />
<meta-data
android:name="firebase_crashlytics_collection_enabled"
android:value="${crashlytics_enabled}" />

View File

@ -57,16 +57,18 @@ class LoginFormPresenter @Inject constructor(
if (it.isEmpty() && !wasEmpty) {
showSymbolInput()
wasEmpty = true
analytics.logEvent("sign_up_send", mapOf(SUCCESS to false, "students" to 0, "endpoint" to endpoint, GROUP_ID to symbol.ifEmpty { "null" }))
} else if (it.isEmpty() && wasEmpty) {
showSymbolInput()
setErrorSymbolIncorrect()
analytics.logEvent(SIGN_UP, mapOf(SUCCESS to false, "students" to it.size, "endpoint" to endpoint, GROUP_ID to symbol.ifEmpty { "nil" }))
analytics.logEvent("sign_up_send", mapOf(SUCCESS to false, "students" to it.size, "endpoint" to endpoint, GROUP_ID to symbol.ifEmpty { "nil" }))
} else {
analytics.logEvent("sign_up_send", mapOf(SUCCESS to true, "students" to it.size, "endpoint" to endpoint, GROUP_ID to symbol))
switchOptionsView()
}
}
}, {
analytics.logEvent(SIGN_UP, mapOf(SUCCESS to true, "endpoint" to endpoint, GROUP_ID to symbol.ifEmpty { "nil" }))
analytics.logEvent(SIGN_UP, mapOf(SUCCESS to false, "endpoint" to endpoint, "message" to it.localizedMessage, GROUP_ID to symbol.ifEmpty { "nil" }))
errorHandler.dispatch(it)
}))
}

View File

@ -60,7 +60,7 @@ class LoginOptionsPresenter @Inject constructor(
}
}
.subscribe({
analytics.logEvent(SIGN_UP, mapOf(SUCCESS to true, "students" to 1, "endpoint" to student.endpoint, GROUP_ID to student.symbol))
analytics.logEvent(SIGN_UP, mapOf(SUCCESS to true, "endpoint" to student.endpoint, "message" to "Success", GROUP_ID to student.symbol))
view?.openMainView()
}, {
errorHandler.dispatch(it)

View File

@ -34,7 +34,6 @@ allprojects {
mavenCentral()
google()
jcenter()
maven { url 'https://maven.fabric.io/public'}
maven { url 'https://jitpack.io' }
}
}