-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
messaging.setBackgroundMessageHandler() not work #161
Comments
@thanhlongmuah do you see anything in your console - specifically the message "[firebase-messaging-sw.js] Received background message " Can you try the following payload code: fcm = FCM.new("FIREBASE_CLOUD_MESSAGING_KEY")
payload = {
data: {
object: data[:object],
type: data[:type],
}
}
fcm.send(DEVICE_TOKEN, payload) Just to see if that changes the output. |
@gauntface thanks for your response. |
See #71. |
@thanhlongmuah Sorry, I'm going to need more information to help solve this. Can you provide example CURL requests you are sending? |
@gauntface I found the reason: fcm ruby gem add notification automatically |
This is my serviceworker code:
I'm using fcm ruby gem to send message: https://github.com/spacialdb/fcm
This is my code:
This is the result:
The text was updated successfully, but these errors were encountered: