-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(android): Add user config. Add push notification bundle edit possibility before processing #2070
base: master
Are you sure you want to change the base?
Conversation
…sibility before processing.
Hi, |
Hello @Dallas62,
As you can see I only need to copy something from data to the root payload (it is "message" if you are interested in order to show notification automatically) if the app is not in the foreground. And as I said there are no ways to edit and "repack" |
Hi @sergey-kozel |
It is already data-only notification. And you are right that I can trigger local notification but the thing is JS code will be executed only if an app in the background but not killed or was not ran at all. And the good solution might be using combined push (notification + data) but as I said we have to maintain the previous versions of the app and obviously they are will be broken with such serious push payload change. |
@sergey-kozel 100% agree, currently switching to a "data-only" notification payload will break backward compatibility. If this works then it would be really helpful. |
You can make your change in your application, release it. Then wait one month to switch to data-only. It's just release management. |
Sometimes it's impossible to change the payload of push notifications on backend, and sometimes we need to add custom logic to push notification processing regarding an app status. In these cases, we need some mechanism of preprocessing the push data before processing it by the module. But due to the fact that there are no ways to do this with
RemoteMessage
type itself (which is the only input parameter), it requires some additional logic from the module. This PR introduces a possibility to edit the push notification bundle before start processing and allows extending module behaviour with user-defined config in the future.