Where to put custom sound in Phonegap app?

Answered

Comments

10 comments

  • Avatar
    Shmakov

    Hello,

    Actually, you should just put it in the bundle of your application. For instance, if you are developing an Android application using PhoneGap, you should put the sound file in res/raw folder.

    Please note that custom sounds do not work at the moment on PhoneGap Build, although we are currently working on it.

  • Avatar
    Daniel Chinchilla

    Perfect! Thank you very much! :)

  • Avatar
    zeeshan

    Is now custom sounds available for phoneGap ?

  • Avatar
    Max Konev

    Yes for Phonegap-Cordova, no for Phonegap Build as it puts sounds in "www" folder which unfortunately is not res/raw.

  • Avatar
    Agamemnus

    Is there any way to change the directory to target www/ instead of res/raw?

  • Avatar
    Max Konev

    The plugin version 3.4.6 has been pushed live. It includes support for custom notification sounds in Phonegap Build. The sounds should go in "www/res" folder.

  • Avatar
    Max Konev

    See answer below

  • Avatar
    Brad Holz

    I have added the sound file to my www/res folder but i'm still unable to get any sound to work, i am using phonegap build 3.6.3

    cheers

  • Avatar
    Mrpro100

    I understand sounds for android not supported for cordova? I tried call "android_sound" : "file:///android_asset/www/sound/messageSound" and "file:///android_asset/www/res/messageSound"

  • Avatar
    Mayur Panchal

    HI, Any Update on Custom sound using PhoneGap Build ? I want to add custom sound and i am using Phonegap Build.

Please sign in to leave a comment.