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

Feature request: A way to determine wether to display notification or not while app is at foreground #148

Open
drgarbage opened this issue Nov 27, 2020 · 0 comments

Comments

@drgarbage
Copy link

Feature request

  • Description: Need a way to avoid notification display while app is at foreground.
  • Labels: type: Enhancement

Is your proposal related to a problem?

The original design of native notification handling is silence first, and developer may decide wether to show notification or display directly in his own UI.

When adapting aliyun push service with react-native-aliyun-push, the AliyunPushManager decide wether to show notification or not by checking if content.body is empty, which makes it harder for a messenger app to handle an incoming message notification while user is already in conversation.

Describe the solution you'd like

After receiving the notification from APNS in foreground, while sending event to javascript, ask script to return a boolean value to decide wether to continue to show notification or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant