katzer / cordova-plugin-local-notifications

Cordova Local-Notification Plugin
Apache License 2.0
2.57k stars 1.75k forks source link

Latest Cordova and Android 6.1 crashes the app when it tries to play the custom sound. #1178

Closed epetre closed 6 years ago

epetre commented 7 years ago

Using the stack below (don't think the ionic2 part is relevant but eh) whenever the sound exists on the device, it crashes the whole app when sending a local notification. I think it's crashing while trying to play it since if I use a sound that doesn't exist, it just doesn't play it but still works without the sound. Also, It used to work before.

LocalNotifications.schedule({
                title: 'title',
                text: 'message',
                smallIcon: 'res://systemicon.png',
                icon: 'some_image_url',
                sound: ('file://assets/notification.mp3'),
                data: { 
                  id: 788,
                  type: 'new_message'
                }
              });

Cordova CLI: 6.4.0 Ionic Framework Version: 2.0.0-rc.4 Ionic CLI Version: 2.1.18 Ionic App Lib Version: 2.1.9 Ionic App Scripts Version: 0.0.48 ios-deploy version: 1.8.6 ios-sim version: 5.0.8 OS: macOS Sierra Node Version: v4.4.3 Xcode version: Xcode 8.2.1 Build version 8C1002

Adriano72 commented 7 years ago

Same for me

rwillett commented 7 years ago

Use template #1188 as there's not enough information here.

I can state that I just created and played a custom sound on Android 6 quite easily though.

katzer commented 6 years ago

has been fixed