0
0
Firebasecloud~10 mins

Crashlytics setup in Firebase - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to initialize Firebase Crashlytics in your app.

Firebase
FirebaseCrashlytics [1] = FirebaseCrashlytics.getInstance();
Drag options to blanks, or click blank then click option'
Ainitialize
Bcrashlytics
Csetup
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using method names instead of variable names.
Trying to call initialization methods that don't exist.
2fill in blank
medium

Complete the code to enable Crashlytics collection in your app.

Firebase
crashlytics.[1](true);
Drag options to blanks, or click blank then click option'
AsetCrashlyticsCollectionEnabled
BenableCrashlytics
CstartCollection
DactivateCollection
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect method names that do not exist.
Forgetting to pass true as argument.
3fill in blank
hard

Fix the error in the code to log a custom key in Crashlytics.

Firebase
crashlytics.[1]("user_id", "12345");
Drag options to blanks, or click blank then click option'
Alog
BaddLog
CrecordException
DsetCustomKey
Attempts:
3 left
💡 Hint
Common Mistakes
Using log which only logs messages, not key-value pairs.
Using non-existent methods like addLog.
4fill in blank
hard

Fill both blanks to log a non-fatal exception with a message.

Firebase
Exception e = new Exception("Crash test");
crashlytics.[1](e);
crashlytics.[2]("Test message");
Drag options to blanks, or click blank then click option'
ArecordException
Blog
CsetCustomKey
DsendException
Attempts:
3 left
💡 Hint
Common Mistakes
Using sendException which is not a valid method.
Mixing up the order of methods.
5fill in blank
hard

Fill all three blanks to disable Crashlytics collection, then enable it again, and finally log a message.

Firebase
crashlytics.[1](false);
crashlytics.[2](true);
crashlytics.[3]("Crashlytics re-enabled");
Drag options to blanks, or click blank then click option'
AsetCrashlyticsCollectionEnabled
Blog
DrecordException
Attempts:
3 left
💡 Hint
Common Mistakes
Using different method names for enabling/disabling collection.
Using recordException instead of log for messages.