Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Notification] Why are notifications not sent when the app is in the foreground? #2974

Open
TBSten opened this issue Jan 15, 2025 · 2 comments
Labels
feature-request Request a new feature Push Notifications Related to the push notifications category

Comments

@TBSten
Copy link

TBSten commented Jan 15, 2025

Looking inside AWSPinpointPushNotificationsPlugin.handleNotificationReceived(), notifications are not displayed on the device when the app is in Foreground.

In some cases it may appear as if it could not be sent, which can be a source of confusion.

If this is the intention, it should be noted in the comments.

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Jan 15, 2025
@thisisabhash thisisabhash added the question General question label Jan 15, 2025
@github-actions github-actions bot removed the pending-triage Issue is pending triage label Jan 15, 2025
@thisisabhash
Copy link
Member

Thank you for posting this - the team will take a look and post updates here.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Jan 15, 2025
@tylerjroach
Copy link
Member

It is intended as the standard behavior for Android notifications is to only display in the background: https://firebase.google.com/docs/cloud-messaging/android/receive.

This behavior is documented here: https://docs.amplify.aws/gen1/android/build-a-backend/push-notifications/record-notifications/#handle-notification-received.

If you want to show notifications while in the foreground, you can modify your extension of the FirebaseMessagingService to fit your needs.

I'll mark this as a feature request to clarify this behavior in code comments.

@tylerjroach tylerjroach added feature-request Request a new feature Push Notifications Related to the push notifications category and removed question General question labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature Push Notifications Related to the push notifications category
Projects
None yet
Development

No branches or pull requests

3 participants