Complete the code to initialize Firebase Crashlytics in your app.
FirebaseCrashlytics [1] = FirebaseCrashlytics.getInstance();You create an instance of FirebaseCrashlytics by calling getInstance() and assigning it to a variable, commonly named crashlytics.
Complete the code to enable Crashlytics collection in your app.
crashlytics.[1](true);true as argument.The method setCrashlyticsCollectionEnabled(true) enables Crashlytics data collection.
Fix the error in the code to log a custom key in Crashlytics.
crashlytics.[1]("user_id", "12345");
log which only logs messages, not key-value pairs.addLog.The correct method to log a custom key-value pair is setCustomKey.
Fill both blanks to log a non-fatal exception with a message.
Exception e = new Exception("Crash test"); crashlytics.[1](e); crashlytics.[2]("Test message");
sendException which is not a valid method.Use recordException to log exceptions and log to add messages.
Fill all three blanks to disable Crashlytics collection, then enable it again, and finally log a message.
crashlytics.[1](false); crashlytics.[2](true); crashlytics.[3]("Crashlytics re-enabled");
recordException instead of log for messages.Use setCrashlyticsCollectionEnabled(false) to disable, then setCrashlyticsCollectionEnabled(true) to enable, and log to add a message.