Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 1 MCQs Building Cloud-Enabled Applications with Firebase

CSE227 — Advanced Android App Development 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Introduction of Firebase Easy

    What is Firebase?

  2. Question 2 of 60 Introduction of Firebase Easy

    Which company currently owns and develops Firebase?

  3. Question 3 of 60 Feature of Firebase Easy

    Which Firebase feature provides a NoSQL cloud database for storing and syncing data in real-time?

  4. Question 4 of 60 Feature of Firebase Easy

    What is the primary purpose of Firebase Cloud Messaging (FCM)?

  5. Question 5 of 60 Feature of Firebase Easy

    Which Firebase feature allows you to run backend code without managing your own servers?

  6. Question 6 of 60 connecting firebase to app Easy

    What is the name of the configuration file that you must download from the Firebase console and add to your Android app?

  7. Question 7 of 60 connecting firebase to app Easy

    In which Gradle file do you typically add the Firebase Bill of Materials (BOM) dependency?

  8. Question 8 of 60 connecting firebase to app Easy

    What unique identifier for your Android app must you provide when registering it in the Firebase console?

  9. Question 9 of 60 Firebase Authentication Easy

    What is the main function of Firebase Authentication?

  10. Question 10 of 60 Firebase Authentication Easy

    Which of the following is a common sign-in provider supported by Firebase Authentication?

  11. Question 11 of 60 Firebase Authentication Easy

    Which object represents the currently authenticated user in the Firebase Android SDK?

  12. Question 12 of 60 Firebase UI Easy

    What is a major benefit of using the FirebaseUI library?

  13. Question 13 of 60 Firebase UI Easy

    The FirebaseRecyclerAdapter from the FirebaseUI library simplifies binding data from a Firebase database to which Android view?

  14. Question 14 of 60 Real time dataset base configure and setup Easy

    How is data structured within the Firebase Realtime Database?

  15. Question 15 of 60 Real time dataset base configure and setup Easy

    Which of the following is used to get the root reference of your Firebase Realtime Database in Android?

  16. Question 16 of 60 CRUD operation Easy

    What does CRUD stand for in the context of database management?

  17. Question 17 of 60 CRUD operation Easy

    Which Firebase Realtime Database method is used to write or replace data at a specific path?

  18. Question 18 of 60 CRUD operation Easy

    To add a new item to a list of data in Firebase without specifying an ID, which method is typically used to generate a unique key?

  19. Question 19 of 60 Firebase Notification Easy

    Which class must you extend to create a service that handles incoming push notifications in an Android app?

  20. Question 20 of 60 Firebase Notification Easy

    What is the unique token that Firebase Cloud Messaging (FCM) assigns to each app instance?

  21. Question 21 of 60 Introduction of Firebase Medium

    A startup is developing a new social media app with a small team. They need to quickly implement user login, data storage, and push notifications without managing server infrastructure. Which classification best describes Firebase in this context?

  22. Question 22 of 60 Feature of Firebase Medium

    An e-commerce app requires complex queries to filter products by price, category, and brand simultaneously. It also needs to scale globally with strong data consistency. Which Firebase database solution is better suited for this requirement?

  23. Question 23 of 60 connecting firebase to app Medium

    When building an Android app with different build flavors (e.g., 'dev' and 'prod') that connect to separate Firebase projects, where should the respective google-services.json files be placed?

  24. Question 24 of 60 Firebase Authentication Medium

    After a user successfully signs in using Firebase Authentication, the client app receives an ID token. What is the primary purpose of this token for validating the user on a custom backend server?

  25. Question 25 of 60 Firebase Authentication Medium

    What is the recommended approach for an Android Activity to react to a user signing in or out at any point while the app is running?

  26. Question 26 of 60 Firebase UI Medium

    A developer needs to add sign-in with Google, Email, and Phone Number to their app. Why might they choose to use the Firebase UI Auth library instead of implementing the Firebase Auth SDK for each provider manually?

  27. Question 27 of 60 Real time dataset base configure and setup Medium

    You are building a chat application using the Firebase Realtime Database. To optimize for performance and scalability, what is the recommended way to structure the data for a group chat with many messages?

  28. Question 28 of 60 Real time dataset base configure and setup Medium

    You need to configure Firebase Realtime Database security rules for a userProfiles node. The rule should allow any authenticated user to read any profile, but a user should only be able to write to their own profile data. Which of the following rules accomplishes this?

  29. Question 29 of 60 CRUD operation Medium

    Given a user object at users/user123 with the data { "name": "Alice", "email": "alice@example.com", "level": 5 }, which CRUD operation would you use to change the level to 6 and add a new status field with the value "active", without affecting the name and email?

  30. Question 30 of 60 CRUD operation Medium

    In a multiplayer game, you are using the Realtime Database to store a player's score. Multiple events can increase the score concurrently. Why is using a transaction (runTransaction()) the correct way to update the score?

  31. Question 31 of 60 Firebase Notification Medium

    When using Firebase Cloud Messaging (FCM) in an Android app, what is the key difference in behavior when a notification payload is received while the app is in the foreground versus in the background?

  32. Question 32 of 60 Firebase Notification Medium

    You are building a feature to send a direct message notification to a specific user. After the user logs into your app, you retrieve and store their unique FCM registration token on your server. How do you use this token to send a notification to only that user's device?

  33. Question 33 of 60 CRUD operation Medium

    On a user's profile screen, you need to load their username and bio once when the screen opens. The data is not expected to change while the user is on that screen. Which method for reading data from the Firebase Realtime Database is most efficient for this use case?

  34. Question 34 of 60 Firebase UI Medium

    You are using the Firebase UI Auth library and want to build a sign-in screen that only offers Google Sign-In and Email/Password authentication. How would you configure the AuthUI.SignInIntentBuilder?

  35. Question 35 of 60 Feature of Firebase Medium

    Your app has a "theme of the day" feature that changes the app's color scheme daily. You want to be able to change this theme for all users without shipping a new app update. Which Firebase feature is best suited for this purpose?

  36. Question 36 of 60 connecting firebase to app Medium

    An Android app successfully connects to Firebase, but after adding a new build variant (e.g., 'staging'), the new variant fails to connect. The error is "Default FirebaseApp is not initialized". What is a likely cause of this issue?

  37. Question 37 of 60 Firebase Authentication Medium

    A user first uses an app with an anonymous account. Later, they decide to create a permanent account using their Google profile. What is the correct Firebase Authentication procedure to merge their anonymous session data with the new Google account?

  38. Question 38 of 60 CRUD operation Medium

    In the Firebase Realtime Database, which of the following method calls on a DatabaseReference pointing to users/user123 is the standard and most explicit way to delete all data at that location?

  39. Question 39 of 60 Firebase Notification Medium

    Your news app allows users to subscribe to different categories like 'sports' and 'technology'. If a user wants to receive notifications for 'sports' but not 'technology', which Firebase Cloud Messaging methods should the app call?

  40. Question 40 of 60 Introduction of Firebase Medium

    What is a key advantage of Firebase's real-time data synchronization for collaborative applications, such as a shared whiteboard or a group document editor?

  41. Question 41 of 60 CRUD operation Hard

    In a Firebase Realtime Database, multiple users are concurrently trying to increment a 'like' counter on a post. Using a simple setValue(currentValue + 1) call leads to a race condition and lost updates. Which of the following is the most robust solution to ensure atomicity for the increment operation?

  42. Question 42 of 60 Firebase Authentication Hard

    When a user signs in with Firebase Authentication, the client receives an ID Token. When this token is sent to your backend server for verification, what is the primary purpose of checking the 'aud' (Audience) claim within the JWT payload?

  43. Question 43 of 60 Firebase Notification Hard

    Your Android app receives an FCM message with both notification and data payloads while the app is in the background. What is the expected behavior on the device?

  44. Question 44 of 60 Real time dataset base configure and setup Hard

    You are designing a security rule for a userProfiles node in Realtime Database. You want to allow a user to write to their own profile (/userProfiles/$uid) but only if the new email field being written matches the email associated with their authentication token. Which rule correctly implements this complex validation?

  45. Question 45 of 60 connecting firebase to app Hard

    You are building an Android app with 'dev' and 'prod' product flavors, each requiring a different Firebase project. What is the correct way to configure your build.gradle and project structure to handle the different google-services.json files?

  46. Question 46 of 60 Firebase UI Hard

    You are using FirebaseUI for Authentication. A user attempts to sign up with an email address that is already associated with an account created via a different provider (e.g., Google). What is the specific error code you should check for in the IdpResponse to handle this account collision scenario and prompt the user to link the accounts?

  47. Question 47 of 60 CRUD operation Hard

    You are modeling a social media app in Realtime Database. To display a user's feed, you need to retrieve 20 posts and, for each post, the author's username and profile picture. A naive approach is to nest author data inside each post object. What is the primary scalability problem with this nested approach?

  48. Question 48 of 60 Firebase Authentication Hard

    You need to implement a custom authentication system where your existing backend server validates user credentials. What is the correct and secure flow for your backend to grant a user access to Firebase services?

  49. Question 49 of 60 Firebase Notification Hard

    Using the Firebase Admin SDK on a server, you send a high-priority FCM message with a ttl (time_to_live) of 3600 seconds to an Android device that is currently turned off. The device is turned back on 2 hours (7200 seconds) later. What happens?

  50. Question 50 of 60 Real time dataset base configure and setup Hard

    To optimize queries in Realtime Database, you add an .indexOn rule for a timestamp child key in your security rules. Which of the following queries will NOT be able to leverage this server-side index?

  51. Question 51 of 60 Feature of Firebase Hard

    You are building an app that requires complex, chained queries (e.g., "find all cities with a population greater than 1 million in countries that are in Europe"). It also needs robust offline capabilities. Which Firebase database product is architecturally better suited for this task and why?

  52. Question 52 of 60 Firebase Authentication Hard

    A user authenticated with Google Sign-In tries to sign up using the same email address with the Email/Password provider. Your app correctly catches the FirebaseAuthUserCollisionException. What is the required sequence of actions to link the new Email/Password credential to the existing Google account?

  53. Question 53 of 60 CRUD operation Hard

    What is the primary function of the onDisconnect() operation in the Firebase Realtime Database SDK, and what is a key limitation to be aware of?

  54. Question 54 of 60 Real time dataset base configure and setup Hard

    You need to write a security rule that allows a user to read a specific 'group' document only if their auth.uid is present as a key in the members map of that same group document. Which rule structure is the most efficient and correct way to achieve this?

  55. Question 55 of 60 connecting firebase to app Hard

    After uploading your release APK to the Play Store, Google Play App Signing re-signs your app with a new key. You notice that Firebase features dependent on the SHA-1 fingerprint, like Google Sign-In and Phone Auth, are failing for users downloading from the store. What is the cause and correct solution?

  56. Question 56 of 60 CRUD operation Hard

    You are implementing infinite scroll pagination in Realtime Database for a list of items sorted by a unique timestamp. Your initial query is ref.orderByChild("timestamp").limitToFirst(10). To fetch the next page, what is the correct and most performant query?

  57. Question 57 of 60 Feature of Firebase Hard

    Which statement accurately describes a key architectural difference between Firebase Realtime Database (RTDB) and Cloud Firestore regarding how they charge for usage?

  58. Question 58 of 60 Firebase Authentication Hard

    A user's Firebase ID token has expired. Your client code attempts to make an authenticated request to a backend resource protected by Firebase security rules. What is the expected behavior of the Firebase SDK?

  59. Question 59 of 60 Firebase UI Hard

    You want to implement a custom theme for the FirebaseUI Auth flow that matches your app's branding, including specific colors for the primary button and a custom logo. What is the correct method for achieving this deep customization?

  60. Question 60 of 60 Firebase Notification Hard

    You need to send a time-critical notification with a custom sound that should bypass the user's Doze mode settings to the greatest extent possible. Which combination of parameters in the server-side FCM payload is most effective for this purpose?

That's unit 1

Answer a few questions and your score shows up here.