adding sound file to res/raw

Hi all,


I'd like to know what's the equivalent action to add sound file (*.mp3) to res/raw folder as in Android studio.

I'm using firebase to send notifications, and managed to customize the icon color, but not the sound yet, as firebase is looking for the sound file under res/raw only.


I tried all the shown below alternatives with no success. Any support is appreciated.


Hi Kata,


1. iOS behaves very differently under the hood but you can use a custom sound by setting the sound: field in the notification payload too. Anyway .mp3 is not a valid APN notification file format, and you need to specify also the file extention.


2. Remember to add the file in your main bundle.

At this point I don't know exactly where the file should be inserted. Have you tried writing the file to the main bundle using file plugin?

https://www.outsystems.com/forge/component-overview/1633/file-plugin


See this post:

https://stackoverflow.com/a/54003722


Regards

Pedro Costa wrote:

Hi Kata,


1. iOS behaves very differently under the hood but you can use a custom sound by setting the sound: field in the notification payload too. Anyway .mp3 is not a valid APN notification file format, and you need to specify also the file extention.


2. Remember to add the file in your main bundle.

At this point I don't know exactly where the file should be inserted. Have you tried writing the file to the main bundle using file plugin?

https://www.outsystems.com/forge/component-overview/1633/file-plugin


See this post:

https://stackoverflow.com/a/54003722


Regards


Thanks Pedro, but my main object is to configure it for android not ios. 

I can see that the File API is used to access files in the runtime not for the configuration. res/raw is just a configuration folder that doesn't exist on the device itself.

The Stackoverflow thread is mentioning exactly what i need to do "adding the custom sound to the res/raw folder"

A new question came up now is also how to create a notification channel id on android 8, which is a must to run custom sounds. Things get complicated :(

Hi Kata, 

I don't think you're going to be able to get to it via Outsystems.  you can unpack your *.apk by renaming it to *.zip, then just unzipping it.  You can see the /res folder is in the root of the application, but all the assets from the Outsystems studio uploads are sitting in /assets/www

you might need to go back to your plugin to see if you can access the audio file from a different directory


Unzipped *.apk: