Giter Club home page Giter Club logo

Comments (9)

katzer avatar katzer commented on May 27, 2024

Hello Allard,

move the sound.mp3 to res/raw. On Android images or sounds must be placed into the res-folder.

sound: "android.resource://" + package_name + "/raw/sound"

from cordova-plugin-local-notifications.

amunters avatar amunters commented on May 27, 2024

Thanks, that's useful information - it works OK now! I also noticed you updated the readme file accordingly - it is more clear now, Many thanks again.

from cordova-plugin-local-notifications.

rodolphorosa avatar rodolphorosa commented on May 27, 2024

I also had this same problem. When I specify the location of a mp3 sound, it's simply not fired. I've tried this, but it's not working:

window.plugin.notification.local.add({
        id:      1,
        title:   'Lembrete',
        message: 'Sua coleta chegou',
        repeat:  'minutely',
        sound: 'android.resource://res/raw/ringtone',
        date:    _60_seconds_from_now
    });

from cordova-plugin-local-notifications.

amunters avatar amunters commented on May 27, 2024

Hi Rodolphorosa,
you need to specify your package name instead of 'res',
see below how I got it working in my app:

         window.plugin.notification.local.add({
             id: '1',
             title: 'EsSense',
             message: 'E-skip / TEP NOW!!',
             ongoing: true,
             icon: 'red48',
             sound: 'android.resource://net.gooddx.essense/raw/ess'
             });

from cordova-plugin-local-notifications.

rodolphorosa avatar rodolphorosa commented on May 27, 2024

this is the package name of your application?

from cordova-plugin-local-notifications.

amunters avatar amunters commented on May 27, 2024

yes!

from cordova-plugin-local-notifications.

rodolphorosa avatar rodolphorosa commented on May 27, 2024

thanks, it worked!

from cordova-plugin-local-notifications.

Riyaz0001 avatar Riyaz0001 commented on May 27, 2024

hey guys, the same problem, sound not played in my real android device version 4.4.2
my code is:

cordova.plugins.notification.local.schedule({
                    id: 1,
                    text: 'Scheduled every minute',
                    every: 'minute',
                    sound: "android.resource://com.test.notificationapp/raw/sound",
                    icon: 'res://icon',
                    smallIcon: 'res://ic_popup_sync'
                });

how to solve this problem? anyone help please, Thanks.

from cordova-plugin-local-notifications.

rwillett avatar rwillett commented on May 27, 2024

Don't hijack closed threads that are over three years. Raise a new issue with the template in #1188.

from cordova-plugin-local-notifications.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.