问题
We are using this the library on our Go server. We need to send push notification with special key for sound object My code looks like:
var NP fcm.NotificationPayload
NP.Sound = "alert.caf"
NP.Icon = "ic_alert"
NP.Color = "colorAccent"
NP.AndroidChannelID = "smartamsalarm"
data = map[string]string{
"msg": "ALARM",
"sum": "1",
}
But I need set key like here:
"sound": {
"critical": 1,
"name": "your_custom_sound.aiff",
"volume": 1.0
}
Can I do it with this library or I should to change?
来源:https://stackoverflow.com/questions/65995901/go-fcm-push-notification-critical-sound