Cordova - sound

Comments

5 comments

  • Avatar
    Roman Solomakha

    Hi,

    Actually, you should indicate only the name of the sound file, not the path to this file. If the file was added properly in the res/raw folder everything should work fine.

    Could you please provide your API request with the "android_sound" parameter?

    Additionally, could you please specify the format of your sound file?

  • Avatar
    Gregory Sohn

    Hey,

    Thanks for your answer. I checked my APK and my sound file, named sound.wav is in the the res/raw folder but still doesn't work.

    Here's my request:

    request": { "application": "XXX-XXX", "auth": "XXX", "notifications": [ { "send_date": "now", "ignore_user_timezone": true, "data": { "type": "XXX" }, "content": { "fr": "XXX" }, "ios_badges": 5, "platforms": [ 1, 3 ], "devices": [ "XXX", "XXX" ], "android_root_params": { "message": "XXX" }, "ios_sound": "sound.wav", "android_sound": "sound" } ]
    }

  • Avatar
    Roman Solomakha

    Everything seems to be fine with this request. Does this issue affect only the android platform? Am I correct that when you are sending this request system plays default notification sound?

  • Avatar
    Gregory Sohn

    No, this is the on IOS.

    Yes, default sound is played on IOS and Android platforms.

  • Avatar
    Roman Solomakha

    I would suggest you to compare your project with Pushwoosh Cordova sample project in order to check whether your sound files are placed in correct folders:

    iOS: https://github.com/Pushwoosh/pushwoosh-sdk-samples/tree/master/Phonegap-Cordova/iPhone-Phonegap

    Android: https://github.com/Pushwoosh/pushwoosh-sdk-samples/tree/master/Phonegap-Cordova/Android-Phonegap

Please sign in to leave a comment.