diff --git a/CHANGELOG.md b/CHANGELOG.md
index 664b51c3..ffc63771 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,9 @@ The changes documented here do not include those from the original repository.
## [Unreleased]
+## 04-04-2023
+- Feat: [Android] Add hook to copy sound files (https://outsystemsrd.atlassian.net/browse/RMET-2378).
+
## 31-03-2023
- Feat: [iOS] React to a triggered notification with custom sound enabled (https://outsystemsrd.atlassian.net/browse/RMET-2381).
diff --git a/hooks/android/sound/unzipAndCopyConfigurations.js b/hooks/android/sound/unzipAndCopyConfigurations.js
new file mode 100644
index 00000000..f4c0190f
--- /dev/null
+++ b/hooks/android/sound/unzipAndCopyConfigurations.js
@@ -0,0 +1,45 @@
+"use strict";
+
+var path = require("path");
+var utils = require("./utilities");
+
+module.exports = function(context) {
+ let cordovaAbove8 = utils.isCordovaAbove(context, 8);
+ let defer;
+ if (cordovaAbove8) {
+ defer = require("q").defer();
+ } else {
+ defer = context.requireCordovaModule("q").defer();
+ }
+
+ let platform = context.opts.plugin.platform;
+ let platformConfig = utils.getPlatformConfigs(platform);
+ if (!platformConfig) {
+ utils.handleError("Invalid platform", defer);
+ }
+
+ let sourceFolderPath = platformConfig.getSoundSourceFolder()
+ let destFolderPath = platformConfig.getSoundDestinationFolder()
+
+ if(!utils.checkIfFolderExists(destFolderPath)) {
+ utils.createOrCheckIfFolderExists(destFolderPath)
+ }
+
+ let files = utils.getFilesFromPath(sourceFolderPath);
+ if (!files) {
+ utils.handleError("No directory found", defer);
+ }
+ else {
+ let filteredFiles = files.filter(function(file){
+ return file.endsWith(platformConfig.soundFileExtension) == true;
+ });
+
+ filteredFiles.forEach(function (f) {
+ let filePath = path.join(sourceFolderPath, f);
+ let destFilePath = path.join(destFolderPath, f);
+ utils.copyFromSourceToDestPath(defer, filePath, destFilePath);
+ });
+ }
+
+ return defer.promise;
+}
diff --git a/hooks/android/sound/utilities.js b/hooks/android/sound/utilities.js
new file mode 100644
index 00000000..82aee8e2
--- /dev/null
+++ b/hooks/android/sound/utilities.js
@@ -0,0 +1,77 @@
+"use strict"
+
+var path = require("path");
+var fs = require("fs");
+
+var utils = require("./utils");
+
+var constants = {
+ platforms: "platforms",
+ android: {
+ platform: "android",
+ wwwFolder: "assets/www",
+ soundFileExtension: ".wav",
+ getSoundDestinationFolder: function() {
+ return "platforms/android/app/src/main/res/raw";
+ },
+ getSoundSourceFolder: function() {
+ return "platforms/android/app/src/main/assets/www";
+ }
+ }
+};
+
+function handleError(errorMessage, defer) {
+ console.log(errorMessage);
+ defer.reject();
+}
+
+function checkIfFolderExists(path) {
+ return fs.existsSync(path);
+}
+
+function getFilesFromPath(path) {
+ return fs.readdirSync(path);
+}
+
+function createOrCheckIfFolderExists(path) {
+ if (!fs.existsSync(path)) {
+ fs.mkdirSync(path);
+ }
+}
+
+function getPlatformConfigs(platform) {
+ if (platform === constants.android.platform) {
+ return constants.android;
+ } else if (platform === constants.ios.platform) {
+ return constants.ios;
+ }
+}
+
+function isCordovaAbove(context, version) {
+ let cordovaVersion = context.opts.cordova.version;
+ console.log(cordovaVersion);
+ let sp = cordovaVersion.split('.');
+ return parseInt(sp[0]) >= version;
+}
+
+
+function copyFromSourceToDestPath(defer, sourcePath, destPath) {
+ fs.createReadStream(sourcePath).pipe(fs.createWriteStream(destPath))
+ .on("close", function (err) {
+ defer.resolve();
+ })
+ .on("error", function (err) {
+ console.log(err);
+ defer.reject();
+ });
+}
+
+module.exports = {
+ isCordovaAbove,
+ handleError,
+ getPlatformConfigs,
+ copyFromSourceToDestPath,
+ getFilesFromPath,
+ createOrCheckIfFolderExists,
+ checkIfFolderExists
+};
\ No newline at end of file
diff --git a/hooks/android/sound/utils.js b/hooks/android/sound/utils.js
new file mode 100644
index 00000000..dee7bf7a
--- /dev/null
+++ b/hooks/android/sound/utils.js
@@ -0,0 +1,7 @@
+module.exports = {
+ getAppName: function (context) {
+ let ConfigParser = context.requireCordovaModule("cordova-lib").configparser;
+ let config = new ConfigParser("config.xml");
+ return config.name();
+ }
+};
\ No newline at end of file
diff --git a/plugin.xml b/plugin.xml
index 5ac3c8a1..0d755094 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -59,6 +59,8 @@
+
+
diff --git a/src/android/com/outsystems/firebase/cloudmessaging/build.gradle b/src/android/com/outsystems/firebase/cloudmessaging/build.gradle
index fc484cca..d38a8c0b 100644
--- a/src/android/com/outsystems/firebase/cloudmessaging/build.gradle
+++ b/src/android/com/outsystems/firebase/cloudmessaging/build.gradle
@@ -23,8 +23,8 @@ apply plugin: 'kotlin-kapt'
dependencies {
implementation("com.github.outsystems:oscore-android:1.2.0@aar")
implementation("com.github.outsystems:oscordova-android:1.2.0@aar")
- implementation("com.github.outsystems:osfirebasemessaging-android:1.0.2.1@aar")
- implementation("com.github.outsystems:oslocalnotifications-android:0.0.2@aar")
+ implementation("com.github.outsystems:osfirebasemessaging-android:1.0.4@aar")
+ implementation("com.github.outsystems:oslocalnotifications-android:0.0.3@aar")
implementation("com.github.outsystems:osnotificationpermissions-android:0.0.4@aar")
implementation("com.google.code.gson:gson:2.8.9")