forked from arnesson/cordova-plugin-firebase
-
-
Notifications
You must be signed in to change notification settings - Fork 479
Closed
Description
let message = {
// notification: {
// title: 'Chamada de serviço',
// body: `R$ ${(snap.after.data().workDoing.priceCents / 100)}`
// },
data : {
priority: '2',
messageType: 'data',
android_channel_id: 'fcm_divas_channel',
notification_android_channel_id: 'fcm_divas_channel',
title : 'Chamada de serviço',
body: `R$ ${(snap.after.data().workDoing.priceCents / 100)}`,
sound: 'divas',
notification_title: 'Chamada de serviço',
notification_body: `R$ ${(snap.after.data().workDoing.priceCents / 100)}`,
notification_android_sound: 'divas',
notification_android_priority: '2',
notification_android_visibility: '1',
notification_android_vibrate: '8000, 200',
vibrate: '8000, 200',
visibility: '1',
notification_foreground: 'true',
show_notification: 'true'
},
android: {
collapse_key: 'a',
priority: 'high',
ttl: '3600s',
notification: {
channel_id: 'fcm_divas_channel',
sound: 'divas',
priority:'high'
}
},
// data : {
// notification_android_sound: 'divas_sound'
// },
// data: {
// message: '',
// type: 'Call'
// },
token: snap.after.data().fcmToken
}
My code:
let channel = {
id: 'fcm_divas_channel',
sound: 'divas',
vibration: [8000, 200],
visibility: 1
}
window.FirebasePlugin.createChannel(channel,
function () {
console.log('Channel created: ' + channel.id)
},
function (error) {
console.log('Set default channel error: ' + error)
})
Why my custom sounds doesn't come to users ? I putted the correct sound divas.mp3 on my res/raw with config.xml parameters as documentation
Metadata
Metadata
Assignees
Labels
No labels