Hello I've a question regarding CrashKios In andro...
# touchlab-tools
f
Hello I've a question regarding CrashKios In android I've the android:name="firebase_crashlytics_collection_enabled in the manifest with false and only want to start the Crashlytics after user consent. However it seems that CrashKios doesn't have a way to enable it. I am right?
k
I'm not sure, exactly, but CrashKios only needs to be involved in Crashlytics startup on iOS. On Android, the only thing CrashKios does is allow you to add breadcrumbs, key/value data, and send handled crash reports. It does this by delegating to Android's Crashlytics instance. So, to answer the question literally:
However it seems that CrashKios doesn't have a way to enable it. I am right?
It does not. You are correct. However, it shouldn't matter as you need to do that stuff in your Android code. CrashKios isn't involved there.
So, the sample has Android setup: https://github.com/touchlab/CrashKiOS/blob/main/samples/sample-crashlytics/app/src/main/java/co/touchlab/crashkiossamplecrashlog/SampleApp.kt. The only CrashKios-specific part of that is
enableCrashlytics()
. That doesn't really do anything other than something internal, which should be removed anyway. Long story, but we used to avoid linking issues on iOS builds for tests using that. It doesn't actually do anything with Crashlytics itself. Without that, calls to
CrashlyticsKotlin
would noop. In fact, if you don't call
CrashlyticsKotlin
from your common code, you could skip CrashKios on android entirely. All of the "work" of CrashKios is for iOS.
f
I see. I was debugging the calls and only when the manifest tag is enabled for Crashlytics the exception are sent. Otherwise nothing is sent.