64
Views
16
Comments
[Firebase Mobile] Push Notif Customize Sound using Firebase Cloud Message Plugin
firebase-mobile
Mobile icon
Forge asset by David Sousa

 Hi All I am currently implementing Firebase with our mobile app. and part of the requirement is the usage of customize sound. I did my research regarding the said approach and would like to ask if anyone has implemented a custom sound when receiving a push notif from Firebase. Here are my list of questions based on the things i researched.
1. In adding the wav/ caf file how can deploy them under the src folder, when i had a chance to unzip the android apk. when the files are tag as deployed in a specific directory they are being stored in the assest file instead of the direct src folder.  
Here are the sample screeshot from the said apk.
2. Is it still possible to implement the said approach for the customized push notification using this parameter in the firebase plugin. 3. If the number 2 question is no longer supported how can I implement the custom sound I am seeing stack overflow discussions however I am not seeing discussion as to how I can implement this in Outsystems.  
Thank you all for answering my queries.

2023-07-10 01-05-12
Michael Kenji Galicinao

Additional to this one. I tried using the file plugin component to save the mp3 file and check the filemanager for the said file here is my result .
Would appreciate some help for this one. Thank you ! 

2018-08-27 08-29-35
Fábio Vaz

Hi Michael,

Push Notification Custom Sound

  1. Have your sound files ready with the correct extension (.wav, .mp3 for Android / .wav, .caf for iOS) and rename them "push_sound".
  2. Prepare a zipped folder called "push_sound.zip" with the sound files.
  3. Add the zip folder to the "www" folder.


2023-07-10 01-05-12
Michael Kenji Galicinao

Hi Fábio I already prepared the zip file. can you tell me how can I deploy the said zip file in the www folder ? Thank you ! 

I tried this in , and opened the android zip. 

2023-07-10 01-05-12
Michael Kenji Galicinao

Hi again Fabio i did what you told me. and rebuilded the app however the sound is still the default and it vibrates . upon opening the Notification i found this things would  you know what to do next ?
Thank you very much for the assist.

2018-08-27 08-29-35
Fábio Vaz

Michael, 

You confirm if the ZIP was placed in the WWW folder (Open the .APK with zip app like 7.zip and validate)? i change the print in previous reply, please check it again. Thank you

2023-07-10 01-05-12
Michael Kenji Galicinao



Here is the new build. and i applied the deploy to target with empty.

2018-08-27 08-29-35
Fábio Vaz

And nothing happens?

According with the plugin code this must works...

2018-08-27 08-29-35
Fábio Vaz

For Android maybe you need to use a .WAV file.

But for iOS the .CAF is correct

2023-07-10 01-05-12
Michael Kenji Galicinao

Okay i will try using the Wav file. And try to test it in IOS.

2023-07-10 01-05-12
Michael Kenji Galicinao

Hi again Fabio i tried to rebuild and use a .wav file  and implement the same deploy to action. and still no notif for android.  but default notif for ios. With the android settings upon fresh install the setting seems to set to the push notif file however i think it is failing to locate the said file. thus not able to sound the custom sound for firebase.

Were you able to let the custom sound work ? 

2018-08-27 08-29-35
Fábio Vaz

Sorry to read that, in this case @DavidSousa is the best person to help we made the changes by plugin code.

2023-07-10 01-05-12
Michael Kenji Galicinao

Can you share some of the updates that you did with the forge component ?  for the parameters or whichever is applicable. 

Did you update the flow here ? 


Btw Thank you for the assistance !  I will try to reach out with David. 

2023-07-10 01-05-12
Michael Kenji Galicinao

I tried also updating the request will this have an effect ? 

{

   "registration_ids":[

     

   ],

   "data":[

      {

         "key":"title",

         "value":" Text"

      },

      {

         "key":"body",

         "value":"Test"

      },

      {

         "key":"click_action",

         "value":"Home"

      },

      {

         "key":"sound",

         "value":"push_sound"

      },

      {

         "key":"platform",

         "value":"android"

      },

      {

         "key":"wwwfolder",

         "value":"assets/www"

      },

      {

         "key":"firebaseFileExtension",

         "value":".json"

      },

      {

         "key":"soundFileName",

         "value":"push_sound.wav"

      }

   ]

}

2018-08-27 08-29-35
Fábio Vaz

Hi Michael,

I didn't use Firebase for push, i just try to understand the Cordova Plugin and help you.

https://github.com/Product-League/cordova-plugin-firebase-only-analytics-notifications

this is the Github used by the plugin.

2023-07-10 01-05-12
Michael Kenji Galicinao

Thank you for the help Fabio, still blocked  with the issue and still no reply from David Sousa. Still Hoping for a work around using this component. Thank you ! 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.