You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a feature that sends a push notification to a user when they receive a new message from another user. This will use Firebase Cloud Messaging (FCM) to deliver the notifications. The notification should include the sender's name and a preview of the message content.
Requirements
FCM Integration:
Integrate Firebase Cloud Messaging (FCM) to send push notifications.
Ensure FCM tokens are stored and managed for each user.
Trigger Notification:
Trigger a notification when a new message is sent.
Fetch the recipient's FCM token from the database.
Notification Content:
The notification should include the sender's name.
A preview of the message content should be displayed.
Handle Notification:
Ensure the app can handle incoming notifications.
Clicking on the notification should navigate the user to the relevant chat screen.
Implementation Details
Store FCM Tokens:
Update the user profile creation and login flows to capture and store the FCM token for each user.
Send Notification on New Message:
Modify the message sending logic to include a step that sends a notification to the recipient.
Use the stored FCM token to send the notification via Firebase Cloud Messaging.
Notification Payload:
Create a payload structure that includes the sender's name and a message preview.
App Notification Handling:
Update the app to handle incoming notifications.
Ensure the app navigates to the correct chat screen when a notification is clicked.
Steps to Reproduce
User A sends a message to User B.
User B should receive a push notification on their device with the message content and sender's name.
Clicking on the notification should open the app and navigate to the chat screen with User A.
The text was updated successfully, but these errors were encountered:
Description
Implement a feature that sends a push notification to a user when they receive a new message from another user. This will use Firebase Cloud Messaging (FCM) to deliver the notifications. The notification should include the sender's name and a preview of the message content.
Requirements
FCM Integration:
Trigger Notification:
Notification Content:
Handle Notification:
Implementation Details
Store FCM Tokens:
Send Notification on New Message:
Notification Payload:
App Notification Handling:
Steps to Reproduce
The text was updated successfully, but these errors were encountered: