Is it possible to set custom notification sound key to iOS and custom android_channel_id to android message?
Basically we want to change call notification sound to different one. I can only see pushNotification
where I can pass notification title. For other thing like android_channel_id
and sound
where I can pass it?
Additionally I use below code to send notification:
var receiverID = "UID";
var customData = {
latitude: "50.6192171633316",
longitude: "-72.68182268750002"
};
var customType = "location";
var receiverType = CometChat.RECEIVER_TYPE.USER;
var metadata = {
pushNotification: "Your Notification Message",
};
var customMessage = new CometChat.CustomMessage(
receiverID,
receiverType,
customType,
customData
);
customMessage.setMetadata(metadata);
CometChat.sendCustomMessage(customMessage).then(
message => {
// Message sent successfully.
console.log("custom message sent successfully", message);
},
error => {
console.log("custom message sending failed with error", error);
// Handle exception.
}
);