Steffaan / cordova-plugin-local-notifications

Cordova Local Notifications Plugin
Apache License 2.0
31 stars 38 forks source link

Trouble with sounds on iOS and Android #32

Open jondspa opened 4 years ago

jondspa commented 4 years ago

WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Provide a general summary of the issue.

Your Environment

Notifications would play a custom sound and not the standard phone notification sound

Actual Behavior

Plays standard phone notification sound

Steps to Reproduce

Android soundFile: `file://assets/ding.mp3' also tried 'res://ding.mp3' also tried 'file:///android_asset/www/assets/ding.mp3'

iOS soundFile = "assets/ding.mp3",

      singleObj = {
                channel: "channel1",
                id: 100 + m,
                text: String(reminders[n][0]),
                priority: 2,
                foreground: true,
                sound: soundFile,

                trigger: {
                    every: {
                        weekday: Number(reminders[n][1][n1]) + 1, // days 1-7
                        hour: Number(reminders[n][2][0]),
                        minute: Number(reminders[n][2][1])
                    },
                    count: 1
                }
            }

It's a great plugin, been using for years! Thanks! But having trouble with custom sounds.

Any help would be most appreciated!