Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

OneSignal Custom Sound



  • Re: Add resource file to monaca project?

    I’m doing the above but it is not working.

    <platform name=“android”>
    <resource dest=“res/raw/alarm.wav” src=“www/sounds/alarm.wav” />

    The app builds but when I extract the apk the alarm.wav is not under /res/raw/



  • I finally figured this out after probably 5+ hours combined of trying. For the next person in the same boat, here’s the solution for both iOS and Android. I hope this helps someone and saves them from the torment I went through trying to figure this out on my own. The audio file in the example below (alarm.wav) is placed in the root of the www folder. You can adjust that as desired.

    <platform name=“android”>
    <resource-file src=“www/alarm.wav” target=“res/raw/alarm.wav” />

    </platform>

    <platform name=“ios”>
    <resource-file src=“www/alarm.wav” target=“res/ios/alarm.wav” />

    </platform>