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

setBackgroundMessageHandler method not calling when send message through REST API #270

Open
deepaktringapps opened this issue Mar 21, 2023 · 0 comments

Comments

@deepaktringapps
Copy link

Description
Description of what the issue is about

Expected behavior
In killed/background mode App should receive "setBackgroundMessageHandler".

Current behavior
In killed/background mode App receiving notification but "setBackgroundMessageHandler" not calling.

Environment

  • React Native 0.71.3
  • Kit: @hmscore/react-native-hms-push": "6.7.0-300"
  • Device: Huawei p40

@ozcanozgur when send notification from pushkit console setBackgroundMessageHandler is called and notification is showing,
When we send notification using REST API setBackgroundMessageHandler is not called, But notification alone showing in notification tray.
Also notification not coming in foreground of the device.

But when application in foreground everything working as expected

Please find REST API Body:

{
"validate_only": false,
"message": {
"data": "{"title" : "test","body" : "This is Huawei Notification","image" : "https://www.image.com"}",
"android": {
"notification": {
"title": "Welcome",
"body": "This is Huawei Notification",
"image": "https://www.image.com/",
"click_action": {
"type": 3
},
"foreground_show": false
}
},
"token": [
"TOKEN"
]
}
}

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