Unit 1 - Practice Quiz

CSE227 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is Firebase?

Introduction of Firebase Easy
A. A programming language for server-side logic
B. A mobile and web application development platform
C. An integrated development environment (IDE) for Android
D. A front-end JavaScript framework

2 Which company currently owns and develops Firebase?

Introduction of Firebase Easy
A. Facebook
B. Google
C. Microsoft
D. Amazon

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

Feature of Firebase Easy
A. Firebase Hosting
B. Firebase Cloud Functions
C. Firebase Realtime Database
D. Firebase Authentication

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

Feature of Firebase Easy
A. To send push notifications and messages to client apps
B. To store user files like images and videos
C. To host static web pages
D. To authenticate users

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

Feature of Firebase Easy
A. Remote Config
B. Cloud Functions
C. Cloud Firestore
D. Cloud Storage

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

connecting firebase to app Easy
A. google-services.json
B. settings.json
C. firebase.properties
D. config.xml

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

connecting firebase to app Easy
A. App-level build.gradle
B. gradle.properties
C. settings.gradle
D. Project-level build.gradle

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

connecting firebase to app Easy
A. Version Code
B. Developer's Email
C. App Name
D. Package Name

9 What is the main function of Firebase Authentication?

Firebase Authentication Easy
A. To store large files
B. To manage user sign-up and sign-in processes
C. To analyze user behavior
D. To optimize app performance

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

Firebase Authentication Easy
A. LinkedIn Sign-In
B. Discord Sign-In
C. Google Sign-In
D. Snapchat Sign-In

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

Firebase Authentication Easy
A. LoggedInUser
B. CurrentUser
C. FirebaseUser
D. AuthUser

12 What is a major benefit of using the FirebaseUI library?

Firebase UI Easy
A. It significantly reduces the size of your final app.
B. It automatically writes database security rules for you.
C. It is required to use any Firebase service.
D. It provides pre-built UI components for tasks like authentication and data display.

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

Firebase UI Easy
A. TextView
B. RecyclerView
C. Button
D. ImageView

14 How is data structured within the Firebase Realtime Database?

Real time dataset base configure and setup Easy
A. In a series of XML files
B. As a collection of documents
C. In tables with rows and columns
D. As a large JSON tree

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

Real time dataset base configure and setup Easy
A. Firebase.getDatabase()
B. FirebaseDatabase.getInstance().getReference()
C. new DatabaseReference("root")
D. RealtimeDatabase.getRoot()

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

CRUD operation Easy
A. Copy, Remove, Unify, Duplicate
B. Connect, Run, Update, Disconnect
C. Create, Read, Update, Delete
D. Cache, Run, Undo, Deploy

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

CRUD operation Easy
A. updateChildren()
B. push()
C. setValue()
D. getValue()

18 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?

CRUD operation Easy
A. push()
B. add()
C. setValue()
D. create()

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

Firebase Notification Easy
A. NotificationService
B. FirebaseMessagingService
C. CloudMessageReceiver
D. AndroidMessagingService

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

Firebase Notification Easy
A. Registration Token
B. User ID
C. API Key
D. Device MAC Address

21 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?

Introduction of Firebase Medium
A. Infrastructure as a Service (IaaS)
B. Software as a Service (SaaS)
C. Backend as a Service (BaaS)
D. Platform as a Service (PaaS)

22 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?

Feature of Firebase Medium
A. Firebase Storage for storing product images
B. Cloud Firestore due to its advanced querying and scalability
C. Firebase Hosting for its static content delivery
D. Firebase Realtime Database due to its low latency

23 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?

connecting firebase to app Medium
A. Both files should be placed in the app/ directory, and the build system will select the correct one.
B. The files should be renamed to dev-google-services.json and prod-google-services.json and placed in the app/ directory.
C. Only one google-services.json can be used per Android module.
D. Place google-services.json for the 'dev' flavor in app/src/dev/ and for 'prod' in app/src/prod/.

24 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?

Firebase Authentication Medium
A. To act as a refresh token to get a new access token indefinitely.
B. To securely send to your custom backend server, which can verify it to authenticate the user's API calls.
C. To directly access and modify the user's Google account data on the client.
D. To be stored in a public directory for session management across multiple devices.

25 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?

Firebase Authentication Medium
A. Continuously check FirebaseAuth.getInstance().getCurrentUser() in a background thread.
B. Save the user's login state in SharedPreferences and check it only when the app launches.
C. Register an FirebaseAuth.AuthStateListener in onStart() and unregister it in onStop().
D. Implement a BroadcastReceiver to listen for system-wide authentication changes.

26 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?

Firebase UI Medium
A. Firebase UI is the only way to implement Phone Number authentication.
B. It works completely offline, while the standard SDK requires a constant internet connection.
C. It provides a complete, drop-in UI flow that handles user journeys like sign-up, sign-in, and password resets, significantly reducing boilerplate code.
D. It allows for deeper customization of the authentication logic than the standard SDK.

27 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?

Real time dataset base configure and setup Medium
A. Store messages in a single JSON file and upload it to Firebase Storage.
B. Create a deeply nested structure: /chatRooms/{roomId}/users/{userId}/messages/{messageId}.
C. Denormalize the data by storing messages in a flat list and using a separate index to map chat rooms to messages.
D. Store all messages as a large array under a single chat room node: /chatRooms/{roomId}/messages: [...].

28 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?

Real time dataset base configure and setup Medium
A. {
"rules": {
"userProfiles": {
".read": "auth != null",
"$uid": {
".write": "auth.uid == $uid"
}
}
}
}
B. {
"rules": {
"userProfiles": {
"$uid": {
".read": "auth != null",
".write": "auth.token.verified == true"
}
}
}
}
C. {
"rules": {
"userProfiles": {
".read": "auth.uid == $uid",
".write": "auth.uid == $uid"
}
}
}
D. {
"rules": {
"userProfiles": {
".read": "true",
".write": "auth != null"
}
}
}

29 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?

CRUD operation Medium
A. database.getReference("users/user123").set({ "level": 6, "status": "active" })
B. database.getReference("users/user123").removeValue() followed by a setValue() call.
C. database.getReference("users/user123").setValue({ "level": 6, "status": "active" })
D. database.getReference("users/user123").updateChildren(new HashMap<String, Object>() {{ put("level", 6); put("status", "active"); }})

30 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?

CRUD operation Medium
A. Because setValue() does not work with numeric data.
B. Because transactions are the only way to write data while the device is offline.
C. Because transactions are faster for simple integer increments.
D. To prevent race conditions where concurrent writes might overwrite each other, ensuring the final score is a result of all increments.

31 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?

Firebase Notification Medium
A. Notifications are never delivered when the app is in the foreground.
B. onMessageReceived() is only ever called if the message contains a data payload, regardless of app state.
C. In the foreground, the system tray handles the notification automatically. In the background, onMessageReceived() is triggered.
D. In the background, the system tray handles the notification automatically. In the foreground, the onMessageReceived() callback is always triggered for you to handle the message.

32 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?

Firebase Notification Medium
A. Broadcast a notification to all devices and include the user ID in the data payload for the client to filter.
B. In your server-side code (e.g., using Firebase Admin SDK), set the token field in the message payload to the user's specific registration token.
C. Use the Firebase Console to manually send a notification by entering the user's email address.
D. Subscribe the user to a topic named after their user ID and send a message to that topic.

33 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?

CRUD operation Medium
A. addValueEventListener() to get real-time updates.
B. addChildEventListener() to listen for changes to child nodes.
C. addListenerForSingleValueEvent() to fetch the data once.
D. Performing a REST GET request to the database URL.

34 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?

Firebase UI Medium
A. The library automatically shows all configured providers; you cannot limit the list.
B. Call createSignInIntentBuilder().setExcludedProviders(Arrays.asList("phone", "facebook"))
C. Call createSignInIntentBuilder().setAvailableProviders(Arrays.asList(new AuthUI.IdpConfig.GoogleBuilder().build(), new AuthUI.IdpConfig.EmailBuilder().build()))
D. You must manually remove the other providers from your Firebase project settings.

35 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?

Feature of Firebase Medium
A. Firebase A/B Testing
B. Firebase Realtime Database
C. Firebase Cloud Messaging
D. Firebase Remote Config

36 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?

connecting firebase to app Medium
A. The device does not have an active internet connection.
B. The apply plugin: 'com.google.gms.google-services' line is missing or misplaced in the app-level build.gradle file.
C. A google-services.json file has not been placed in the new build variant's source set (app/src/staging/).
D. The user has not granted the app the necessary runtime permissions.

37 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?

Firebase Authentication Medium
A. This is not possible; anonymous accounts cannot be converted.
B. Get an AuthCredential from the Google Sign-In result and use firebaseAuth.getCurrentUser().linkWithCredential(credential).
C. Delete the anonymous user and create a new Google user.
D. Manually copy data from the anonymous UID node to the Google UID node in the database.

38 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?

CRUD operation Medium
A. ref.removeValue()
B. ref.setValue("")
C. ref.clear()
D. ref.delete()

39 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?

Firebase Notification Medium
A. FirebaseMessaging.getInstance().setTopics(Arrays.asList("sports"))
B. FirebaseMessaging.getInstance().subscribeToTopic("sports-only")
C. FirebaseMessaging.getInstance().subscribeToTopic("sports") and FirebaseMessaging.getInstance().unsubscribeFromTopic("technology")
D. This must be configured server-side; the client cannot manage its own subscriptions.

40 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?

Introduction of Firebase Medium
A. It guarantees that data is only ever written to the database from a secure backend.
B. It automatically handles offline data persistence and synchronizes changes back to the server once connectivity is restored.
C. It requires developers to manually implement WebSocket protocols for real-time communication.
D. It provides a complete SQL-based query language for complex data analysis.

41 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?

CRUD operation Hard
A. Using a runTransaction block to read the current value, increment it, and set the new value.
B. Using onSuccessListener to re-fetch the value and set it again if it has changed.
C. Enforcing a security rule that only allows increments of 1 using .validate.
D. Using ServerValue.increment(1) which is a native atomic operation on the server.

42 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?

Firebase Authentication Hard
A. To confirm the user's unique ID (UID).
B. To verify that the token was intended for your specific Firebase project and not another.
C. To verify that the token was issued by Google's authentication servers.
D. To ensure the token has not expired.

43 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?

Firebase Notification Hard
A. The system tray displays the notification automatically, and onMessageReceived() is not called. The data payload is delivered in the Intent extras of the launcher Activity if the user taps the notification.
B. Only FirebaseMessagingService.onMessageReceived() is triggered, and you are responsible for building and displaying the notification.
C. The FirebaseMessagingService.onMessageReceived() is triggered, and the system tray displays the notification automatically.
D. The device ignores the message because it contains conflicting payloads.

44 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?

Real time dataset base configure and setup Hard
A. {
"rules": {
"userProfiles": {
"$uid": {
".write": "auth.uid === $uid && newData.child('email').val() === auth.token.email"
}
}
}
}
B. {
"rules": {
"userProfiles": {
"$uid": {
".write": "auth.uid === $uid",
".validate": "data.child('email').val() === auth.token.email"
}
}
}
}
C. {
"rules": {
"userProfiles": {
"$uid": {
".write": "auth.uid === $uid",
".validate": "newData.child('email').val() === auth.token.email"
}
}
}
}
D. {
"rules": {
"userProfiles": {
"$uid": {
".write": "auth.uid === $uid",
"email": { ".validate": "newData.val() == auth.token.email" }
}
}
}
}

45 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?

connecting firebase to app Hard
A. In build.gradle, use a conditional statement to define a firebase_config build variable for each flavor.
B. Place both google-services.json files in app/ and rename them to google-services-dev.json and google-services-prod.json.
C. You can only connect one Firebase project per Android application ID, so this configuration is not possible.
D. Create directories app/src/dev/ and app/src/prod/ and place the corresponding google-services.json file inside each.

46 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?

Firebase UI Hard
A. ErrorCodes.EMAIL_MISMATCH_ERROR
B. ErrorCodes.ANONYMOUS_UPGRADE_MERGE_CONFLICT
C. ErrorCodes.DEVELOPER_ERROR
D. ErrorCodes.PROVIDER_ERROR

47 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?

CRUD operation Hard
A. It prevents you from querying posts by a specific author.
B. It makes updating a user's username inefficient, as it requires updating every post they've ever made.
C. It violates Firebase security rules which prevent deep nesting.
D. It significantly increases the storage cost on Firebase servers.

48 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?

Firebase Authentication Hard
A. The backend generates a standard JWT with the user's UID and sends it to the client, which uses signInWithCustomToken().
B. The backend uses the Admin SDK to create a new user with createUser() on every login and returns the new user's credentials to the client.
C. The backend receives the user's Firebase ID Token, modifies its claims, and sends it back to the client.
D. The backend uses the Firebase Admin SDK's createCustomToken(uid) method to generate a signed token, which is sent to the client to be used with signInWithCustomToken().

49 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?

Firebase Notification Hard
A. The message is discarded by FCM servers and is never delivered because its ttl has expired.
B. The message is delivered immediately upon the device reconnecting to FCM.
C. The message is delivered, but its priority is downgraded to 'normal'.
D. FCM attempts to deliver the message, but it fails, and a delivery_receipt_requested callback is triggered on the server.

50 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?

Real time dataset base configure and setup Hard
A. ref.orderByChild("user_id").equalTo("some_user_id")
B. ref.orderByChild("timestamp").endAt(1672531200)
C. ref.orderByChild("timestamp").startAt(1672531200)
D. ref.orderByChild("timestamp").limitToLast(10)

51 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?

Feature of Firebase Hard
A. Realtime Database, because its listener-based model is faster for real-time updates.
B. Cloud Firestore, because it supports compound queries on multiple fields and has a more advanced offline caching mechanism.
C. Cloud Firestore, because it is a relational database and supports SQL-like joins.
D. Realtime Database, because its flexible data structure allows for easy nesting of countries and cities.

52 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?

Firebase Authentication Hard
A. Call firebaseAuth.signInWithCredential(credential) immediately, which will automatically merge the accounts.
B. Delete the existing Google user and create a new user with the combined credentials.
C. Get the AuthCredential from the exception, sign the user in with Google, and then call firebaseUser.linkWithCredential(credential).
D. Prompt the user to reset their password for the existing account and then sign in.

53 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?

CRUD operation Hard
A. It queues a set of write operations on the Firebase server to be executed when the client disconnects. These operations are not guaranteed if the server crashes.
B. It registers a client-side listener that survives app restarts. Its limitation is that it consumes significant battery.
C. It triggers a client-side callback when the network connection is lost, allowing for UI updates. It is not guaranteed to execute.
D. It queues write operations on the server that execute when the client's session ends. It's best-effort and might not run if the disconnect is not clean (e.g., app crash).

54 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?

Real time dataset base configure and setup Hard
A. {
"rules": {
"groups": {
".read": "query.uid == auth.uid"
}
}
}
B. {
"rules": {
"groups": {
"$groupId": {
".read": "root.child('users').child(auth.uid).child('groups').hasChild($groupId)"
}
}
}
}
C. {
"rules": {
"groups": {
"$groupId": {
".read": "data.child('members').val().contains(auth.uid)"
}
}
}
}
D. {
"rules": {
"groups": {
"$groupId": {
".read": "data.child('members').child(auth.uid).exists()"
}
}
}
}

55 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?

connecting firebase to app Hard
A. You need to add the release.keystore SHA-1 to your Firebase project settings.
B. You must re-upload the APK after signing it with the same key Google uses.
C. You must disable App Signing in the Play Console.
D. You need to retrieve the 'App signing key certificate' SHA-1 from the Play Console and add it to your Firebase project settings.

56 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?

CRUD operation Hard
A. ref.orderByChild("timestamp").limitToFirst(10).startAt(lastItemTimestamp + 1)
B. ref.orderByChild("timestamp").limitToFirst(11).startAt(lastItemKey) and then remove the first item on the client side.
C. ref.orderByChild("timestamp").limitToFirst(10).startAt(lastItemTimestamp, lastItemKey)
D. ref.orderByChild("timestamp").limitToFirst(10).startAfter(lastItemTimestamp)

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

Feature of Firebase Hard
A. Both charge for operations, but Firestore's operations are significantly cheaper.
B. RTDB charges per connected client, while Firestore charges for storage.
C. Firestore charges for bandwidth and CPU usage, while RTDB charges for storage and operations.
D. RTDB charges primarily for bandwidth and storage, while Firestore charges primarily for the number of read/write/delete operations.

58 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?

Firebase Authentication Hard
A. The SDK automatically queues the request, silently uses the refresh token to get a new ID token, and then retries the request transparently.
B. The request is allowed, but the auth variable in the security rules will be null.
C. The SDK throws a FirebaseAuthInvalidUserException which must be caught to trigger a re-authentication flow.
D. The request fails immediately with a 'permission-denied' error, and it is the developer's responsibility to handle the token refresh.

59 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?

Firebase UI Hard
A. Use reflection at runtime to access and modify the private views of the FirebaseUI activities.
B. Create a new style in your styles.xml that inherits from one of the FirebaseUI themes (e.g., FirebaseUI.Auth.Theme) and override specific attributes like colorPrimary and colorButtonNormal. Then, set this style in the createSignInIntentBuilder().
C. Pass a Bundle of color resources to the AuthUI.getInstance().createSignInIntentBuilder() method.
D. You must fork the FirebaseUI repository and modify the layout XML files directly.

60 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?

Firebase Notification Hard
A. {
"priority": "high",
"android": {
"priority": "high",
"notification": { "sound": "custom.wav", "channel_id": "my_channel" }
}
}
B. {
"priority": "urgent",
"notification": { "sound": "custom.wav" },
"ttl": "0s"
}
C. {
"priority": "high",
"data": { "message": "..." },
"android": {
"notification": { "sound": "custom.wav", "default_vibrate_timings": false }
}
}
D. {
"content_available": true,
"apns": { "headers": { "apns-priority": "10" } },
"android": { "sound": "custom.wav" }
}