0
0
Android Kotlinmobile~20 mins

Firebase project setup in Android Kotlin - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Firebase Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Firebase Project Initialization
What is the first step to connect your Android app to a Firebase project?
ADownload the google-services.json file and place it anywhere in your project folder.
BAdd Firebase dependencies to your build.gradle file before creating a Firebase project.
CCreate a Firebase project in the Firebase console and register your Android app with its package name.
DWrite Kotlin code to initialize Firebase in your MainActivity before creating a Firebase project.
Attempts:
2 left
💡 Hint
Think about what you need to do before adding code or files.
ui_behavior
intermediate
2:00remaining
Placing google-services.json
Where should you place the google-services.json file in your Android project for Firebase to work correctly?
AIn the app/ directory of your Android project.
BIn the build/ directory.
CIn the src/main/java/ directory.
DIn the root directory of your Android project.
Attempts:
2 left
💡 Hint
It should be where your app module files are.
📝 Syntax
advanced
2:00remaining
Adding Firebase Plugin in build.gradle
Which line correctly applies the Firebase plugin in your app-level build.gradle file?
Android Kotlin
plugins {
    id("com.android.application")
    // Add Firebase plugin here
}
Aapply plugin: 'firebase-google-services'
Bapply plugin: 'com.google.gms.google-services'
Cid("com.google.firebase")
Did("com.google.gms.google-services")
Attempts:
2 left
💡 Hint
Use the plugins block syntax with the correct plugin id.
lifecycle
advanced
2:00remaining
Firebase Initialization Timing
When is the best time to initialize Firebase in your Android app to ensure it works properly?
AIn the onCreate() method of your Application class before any UI is created.
BIn the onStart() method of your MainActivity after UI is visible.
CIn the onResume() method of your MainActivity after user interaction.
DIn a background thread after the app has fully loaded.
Attempts:
2 left
💡 Hint
Think about when Firebase services should be ready for use.
🔧 Debug
expert
2:00remaining
Debugging Missing Firebase Configuration
Your app crashes with a runtime error saying "Default FirebaseApp is not initialized". Which of the following is the most likely cause?
AYou did not add Firebase dependencies in the project-level build.gradle file.
BThe google-services.json file is missing or placed in the wrong folder.
CYou forgot to add internet permission in AndroidManifest.xml.
DYou initialized Firebase twice in your Application class.
Attempts:
2 left
💡 Hint
Check if the configuration file is correctly included.