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 log a custom message to Crashlytics.
crashlytics.[1]("User clicked the button");
report or send which are not valid methodstrack which is not a Crashlytics methodThe log method sends custom messages to Crashlytics to help understand app behavior before a crash.
Fix the error in the code to record a non-fatal exception in Crashlytics.
crashlytics.[1](new Exception("Network error"));
sendExceptionThe correct method to record non-fatal exceptions in Firebase Crashlytics is recordException.
Fill both blanks to set a user identifier and enable Crashlytics collection.
crashlytics.[1]("user_123"); crashlytics.[2](true);
setUserenableCrashlytics which does not existUse setUserId to identify the user and setCrashlyticsCollectionEnabled to turn on crash data collection.
Fill all three blanks to record a custom key, log a message, and force a crash.
crashlytics.[1]("last_screen", "Home"); crashlytics.[2]("App crashed due to unexpected input"); crashlytics.[3]();
recordException instead of crash to force a crashsetCustomKey adds custom data, log records a message, and crash forces a crash for testing.